Here’s my current coloring routine:
Private Sub ColorGridGroups(ByVal grid As GridControl)
Dim Toggle As Boolean = False
For Each myGroup As Group In grid.Groups
Toggle = (Toggle = False)
If Toggle Then
myGroup.BackColor = Color.Beige
End If
Next
End Sub
The problem is this: The groups are built dynamically and are getting placed into the Groups collection in the order of creation – but VISUALLY they are sorted (ascending) so the above loop does not produce the desired result which would be “Alternating group colors.”
Is there anyway to loop the Groups collection in a sorted manner? Or alternately is there a method like, GetSortedGroups that I’m not seeing?
I’m looking for a convenient method, not the grunt method which would be capturing the Title of the group into an arraylist along with their indexes, sorting the arraylist and then looping through that sort.
Thanks all!
-LK
Imported from legacy forums. Posted by Curtis (had 2344 views)