on 12-22-2014 8:28 AM
Hi
I am displaying data in a matrix . I want the color of row should change on which row user clicked.
Thanks
Hi,
Try this..
Dim oGridSetting As SAPbouiCOM.CommonSetting = Me.m_Grid.CommonSetting
For i As Integer = 2 To Me.m_Grid.DataTable.Rows.Count Step 2
oGridSetting.SetRowBackColor(i, CONSTANTS.ROW_BACKGROUND_GRAY)
Next i
Regards,
Prasad
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI.
YOU CAN USE DOUBLE CLICK EVENT
TRY
'' If (pVal.BeforeAction = TRUE And pVal.ITEMUID = "YOURMATRIXUID" AND PVAL.FORMUID="YOURFORMUID") Then
IF PVAL.COLUID="YOURMATRIXCOLUMNUID" THEN
--EXAMPLES PVAL.COLUID ="V-_1" FOR FIRST COLUMN #
'' omatrix = oForm.Items.Item("MATRIXUID").Specific
'' For i As Integer = 1 To omatrix.VISUALROWCOUNT
'' If (omatrix.IsRowSelected(i) = True) Then
omatrix.CommonSetting.SetCellBackColor(i, 10, -7)
I= ROW AND 10 IS COLUMN -7 IS RGB COLOR
''
END IF
END IF
END IF
REFER NET FOR RGB COLOR CODES..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
I have the below code but it is not going in this condition
If pVal.ColUID = "V-_1" Then
Private Sub SBO_Application_ItemEvent(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef BubbleEvent As Boolean) Handles SBO_Application.ItemEvent
If pVal.FormTypeEx = "TypeFrmMatrix" And pVal.BeforeAction = True Then
Try
If (pVal.ItemUID = "MATRIX1" And pVal.EventType = SAPbouiCOM.BoEventTypes.et_CLICK) Then
If pVal.ColUID = "V-_1" Then
oMatrix = oForm.Items.Item("MATRIXUID").Specific
For i As Integer = 1 To oMatrix.VisualRowCount
If (oMatrix.IsRowSelected(i) = True) Then
oMatrix.CommonSetting.SetCellBackColor(i, 10, -7)
End If
Next
End If
End If
Catch ex As Exception
SBO_Application.MessageBox(ex.Message)
End Try
End If
End sub
Thanks
Hi
This line is just reference . This line in code does not exist. I have just written this line on forum
Above code is not highlighting the row. Below is the actual code
Private Sub SBO_Application_ItemEvent(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef BubbleEvent As Boolean) Handles SBO_Application.ItemEvent
If pVal.FormTypeEx = "TypeFrmMatrix" And pVal.BeforeAction = True Then
Try
If (pVal.ItemUID = "MATRIX1" And pVal.EventType = SAPbouiCOM.BoEventTypes.et_CLICK) Then
If pVal.ColUID = "V-_1" Then
oMatrix = oForm.Items.Item("MATRIXUID").Specific
For i As Integer = 1 To oMatrix.VisualRowCount
If (oMatrix.IsRowSelected(i) = True) Then
oMatrix.CommonSetting.SetCellBackColor(i, 10, -7)
End If
Next
End If
End If
Catch ex As Exception
SBO_Application.MessageBox(ex.Message)
End Try
End If
End sub
Thanks
Hi
I have written the below code but it is not going in - If (oMatrix.IsRowSelected(i) = True) Then condition
If (pVal.FormTypeEx = "TypeFrmMatrix" And pVal.BeforeAction = True And pVal.ItemUID = "Matrix1") Then
Try
If pVal.ColUID = "Code" Then
oMatrix = oForm.Items.Item("Matrix1").Specific
For i As Integer = 1 To oMatrix.VisualRowCount
If (oMatrix.IsRowSelected(i) = True) Then
MessageBox.Show(i)
oMatrix.CommonSetting.SetCellBackColor(i, 10, -7)
End If
Next
End If
Catch ex As Exception
SBO_Application.MessageBox(ex.Message)
End Try
End If
Thanks
User | Count |
---|---|
91 | |
10 | |
10 | |
6 | |
5 | |
5 | |
5 | |
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.