How to implement this kind of color banding?
We are working on a SDK add-on, and are using Visual Basic.NET.
We have generated a grid which derives its data from a Query.
We want to colour the rows (in a special way) to facilitate reading the data on the grid.
Please see the picture.
Anybody has an idea how to implement this kind of colour banding?
Leon Lai & Team
Edy Simon replied
Dim LastColour as String = Red
Dim LastITRef as String = ""
For i as integer = 0 to oGrid.Rows.Count -1
Dim CurrentRowITRef as String = oGrid.DataTable.Rows.GetValue("col", oGrid.GetDataTableRowIndex(i)).ToString.Trim
If LastITRef = CurrentRowITRef then
'Set Current Row to LastColur.
If LastColur = Red Then
'Your code to set Current Row as Blue here
LastColour = 'Blue'
'Your code to set Current Row as Red here
LastColour = 'Red'
LastITRef = CurrentRowITRef