BackColor Property
Description
The background color of a GridRecordItem.
Property Type
Read-write property
Syntax (Visual Basic)
Public Property BackColor() As ULong
Remarks
This property will contain a reference to the BackColor of a GridRecordItem when the BeforeDrawRow event is executed. You can then edit the color, and it will modify the BackColor of the GridRecordItem.
Example
Modifying the BackColor of a GridRecordItem (Visual Basic)
This sample illustrates how to modify the BackColor of a GridRecordItem using the GridRecordItemMetrics object in the BeforeDrawRow event.
' This event is called for each GridRecordItem in each GridRow before it is drawn
Private Sub wndGridControl_BeforeDrawRow(ByVal Row As XtremeGridControl.IGridRow, _
ByVal Item As XtremeGridControl.IGridRecordItem, _
ByVal Metrics As XtremeGridControl.IGridRecordItemMetrics)
' This block of code is only executed if the index of the GridRow the GridRecordItem is on is
' an even number. This will cause the code to be executed for every other row. So the BackColor
' of all GridRecordItems in a GridRow will be modified.
If (Row.Index Mod 2 = 0) Then
' This will change the BackColor of the GridRecordItem
Metrics.BackColor = RGB(255, 245, 255)
End If
End Sub
See Also
Copyright (c) 1998-2024 Codejock Technologies. All rights reserved.