Your users ask to see rows "by region" or "per country", and the grid groups them, in the nesting order they give.
Group by region
group regionGroup by country first, then department
group countrygroup departmentGrouping combines with filters and sorting in one question:
Group by country, only revenue greater than 250, sort countries ascending and revenue descending within each country
filter revenue > 250group countrysort country ascendingsort revenue descending"Revenue by category" groups and adds a total: see Aggregation. "Revenue by category across years" is a cross-tab: see Pivoting.
| Setting | Where | With MUI's stock resolver | With the Gridsay helper |
|---|---|---|---|
disableRowGrouping | Grid prop | Not sent. Gridsay answers with groups, the grid does not apply them, and the panel still reports success. | Sent. A question that needs grouping is declined. |
groupable: false | Column | Not sent. The grid groups by that column anyway: MUI allows it from code. | Sent. Grouping by that column is declined. |
defaultGroupingExpansionDepth | Grid prop | New groups open collapsed, so an answer can show only group headers. -1 opens them all. | The same. |
rowGroupingColumnMode | Grid prop | A sort on a grouped column does not reorder the groups. | Sorting a grouped column reorders the groups in both modes. |
Groups are opened and closed by your grid's settings: an answer cannot expand or collapse them.
Grouping by a date makes one group per exact date. There is no group "by year" or "by month" unless a column holds that value. The year and quarter columns MUI derives from a date exist only for pivots:
Group by order date year
I can't group by year; try pivoting by Order date (Year).
Your user reads this sentence. The table stays as it was.With the helper and disableRowGrouping on:
Group by region
I can't group rows here; try filtering or sorting by region instead.
Your user reads this sentence. The table stays as it was.With the helper and groupable: false on the manager column:
Group by manager
I can't group by manager; try grouping by department or level.
Your user reads this sentence. The table stays as it was.If an answer still groups after one correction, the sentence is "Grouping is switched off for this table." or, naming the column, The `manager` column can't be grouped.