You cannot change the groups key once it is set, thus you will not be able to change the way it sorts. The only workaround we see is to group twice. That is, you let the grid group the first time, you get the information on the number of rows in each group, then delete the grouping, and do it a second time, but this time, use the QueryGroupKeys event to set the right keys so the groups will sort in the right order. Of course, this will work ok if you have a small grid, but as the number of rows increases, this may become a poor workaround.
BTW, you should retrieve the GroupManagerRow this way :
GroupManagerRow row = ( GroupManagerRow )gridControl1.Groups[ 0 ].HeaderRows[ 0 ];
Imported from legacy forums. Posted by André (had 4034 views)