on 12-24-2014 8:00 AM
Dear Sir
I have written the below code . I want instead of clicking on "#" if we click on any column in row it should get highlight.
If (pVal.FormTypeEx = "TypeFrmMatrix" And pVal.BeforeAction = True And pVal.ItemUID = "Matrix1") Then
Try
If (pVal.ColUID = "#" And pVal.EventType = SAPbouiCOM.BoEventTypes.et_CLICK) Then
oMatrix = oForm.Items.Item("Matrix1").Specific
oMatrix.SelectionMode = SAPbouiCOM.BoMatrixSelect.ms_Single
For i As Integer = 1 To oMatrix.RowCount
If (oMatrix.IsRowSelected(i) = True) Then
oMatrix.SelectRow(i, True, True)
End If
Next
End If
Catch ex As Exception
SBO_Application.MessageBox(ex.Message)
End Try
End If
Thanks
Hi Sunny,
For a test, I have just used this:
if (pVal.ItemUID == enControlName.Matrix && (pVal.ColUID == "colItemCode" | pVal.ColUID == "colItemName") && pVal.EventType == BoEventTypes.et_CLICK && pVal.FormMode == 1)
{
SAPbouiCOM.Matrix oMatrix = (SAPbouiCOM.Matrix)m_SBO_Form.Items.Item("Matrix").Specific;
int Row = pVal.Row;
oMatrix.SelectRow(Row, true, false);
}
Hope it helps.
Thanks & Regards
Ankit Chauhan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sunny,
It looks that your code is ready to use. Just add all the ColUID for all the columns in the matrix.
This will work for you.
Hope it helps.
Thanks & Regards
Ankit Chauhan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
107 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.