WarUI

Sorting Grouped Rows

GRID-A09-F17P1baselinePlanned

When rows are grouped, sorting a column orders the leaf rows inside each group. Groups themselves can be ordered by their key or by an aggregate value, such as total revenue. Group order and leaf order are configured independently.

Planned. This page shows the specification from issue #186. The live example, source for every framework and the API reference replace it when the feature ships.

Live example

A deals grid grouped by Region and then Rep, with a sum aggregate on Amount.

Expected behavior

Sorting Amount descending with byAggregate puts the region with the largest total first, and deals inside each region are sorted by amount. With byKey, regions sort alphabetically while the leaf rows still follow the Amount sort.

Planned API surface

groupSortModecolumns[].sortGroupsByAggregateautoGroupColumn.comparatorapi.setSortModel

Acceptance criteria

  • Leaf rows are sorted within their parent group only (pending)
  • Group ordering follows groupSortMode (pending)
  • Sorting does not change which groups are expanded (pending)
  • Aggregate values are recalculated before the groups are sorted (pending)
  • Group footer rows stay attached to their group (pending)