Hybrid View

Group sorting in Grid w/ grouping

Hi, I have a Grid with grouping and I need to sort the groups with another criteria different from the default (for example, if you are using a string field to group records, the default sort is the alphabetical order).

Lets put an example using the demo here http://gwt-ext.com/demo/#gridGrouping
Grouping here is done using the 'industry' field, so groups are sorted using the alphabetical order of the industry (first Automotive, then Computer, etc...). What I need to do is to sort these groups under some other criteria, for example the number of records inside each group. Using this strategy groups would be listed as Automotive (1 record), then Food (2 records), .... last Manufacturing (9 records).

Is there any way to achieve this? The sorting function depends on some info inside the groups.

I am actually having the same problem. I would like to sort on a field other than the grouping field. It looks like it always sorts on the grouping field in ascending order. Haven't quite figured out how to stop this.

i am having a problem with this one, the grid sorting works fine on default sort but if i try to sort it with other fields (by clicking on the grid header), the grouping sometimes gets messed up, items that should be in the same group are being divided into 2 or more groups with the same name, please help