Home Forums WinForms controls Xceed Grid for WinForms Coloring Alternating Sorted Groups….How? Reply To: Coloring Alternating Sorted Groups….How?

User (Old forums)
Member
Post count: 23064

Try this (untested code):<pre>Dim toggle As Boolean = False
Dim row As Xceed.Grid.DataRow
Dim group As Xceed.Grid.GroupBase = Nothing
For Each row in grid.GetSortedDataRows(True) Do
If row.ParentGroup <> group Then
group = row.ParentGroup
toggle = Not toggle
If toggle Then
group.BackColor = Color.Beige
End If
End If
Next</pre>

Imported from legacy forums. Posted by Tommy (had 349 views)