Question

As an example, suppose that a grid exists with the following columns: Name, Age, Pet.

Also suppose the only possible pets are from the set (Dog, Cat, Fish).

I have applied the grouping feature with groupField: 'Pet'. By default, the grid is rendered with the rows grouped by pets in the ascending order of possible pets.

Something like:

Pet: Cat (30)
----------------
[30 Cat Rows]

Pet: Dog (10)
----------------
[10 Cat Rows]

Pet: Fish (10)
----------------
[10 Cat Rows]

I want to control the sorting order of the grouped column too, so the order of the groups can be descending too:

Pet: Fish (10)
----------------
[10 Cat Rows]

Pet: Dog (10)
----------------
[10 Cat Rows]

Pet: Cat (30)
----------------
[30 Cat Rows]

The above should be supported for any column (on which grouping is possible) in the grid.

Is there a way to achieve this?

Was it helpful?

Solution

Check groupDir, setting groupDir: 'DESC' should work..

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top