Skip to content
MUI’s hosted AI Assistant backend shuts down at the end of 2026.Switch in two lines →
  • Products
    • AG Grid AI Toolkit Early accessThe model and the server behind the toolkit.
    • MUI X Data Grid StableThe backend for the Premium AI Assistant.
    • TanStack Table Public alphaA plugin that applies each answer to your table.
    • AG Studio Early accessA hosted backend for its assistant, not built yet.
  • How it works
  • Accuracy
  • Pricing
  • Security
  • Docs
    • Quickstart: server route
    • Quickstart: TanStack Table
    • Browser keys
    • Moving from MUI’s hosted service
    • Guide: when MUI’s service retires
Sign inStart a 7-day trial
Menu
  • Products
    • AG Grid AI Toolkit Early access
    • MUI X Data Grid Stable
    • TanStack Table Public alpha
    • AG Studio Early access
  • How it works
  • Accuracy
  • Pricing
  • Security
  • Docs
    • Quickstart: server route
    • Quickstart: TanStack Table
    • Browser keys
    • Moving from MUI’s hosted service
    • Guide: when MUI’s service retires
  • Sign in

Product

  • How it works
  • Accuracy
  • Pricing
  • Data and security

Grids

  • AG Grid AI ToolkitEarly access
  • MUI X Data Grid PremiumStable
  • TanStack TablePublic alpha
  • AG StudioEarly access

Docs

  • Quickstart: server route
  • Browser keys
  • Guide: when MUI’s service retires

Company

  • Contact
  • Terms
  • Privacy

Not affiliated with or endorsed by MUI or AG Grid. MUI and AG Grid are trademarks of their respective owners.

© 2026 Gridsay

Docs pages
Start
  • Documentation
  • How it works
  • Examples
MUI X Data Grid
  • Quickstart: server route
  • From the browser
  • Using the helper
  • Filtering
  • Sorting
  • Grouping
  • Aggregation
  • Pivoting
  • Charts
  • Row selection
  • Follow-up questions
  • Refusals and errors
  • Moving from MUI’s service
  • Reference
TanStack Table
  • Quickstart
  • Describing columns
  • Filtering
  • Sorting
  • Grouping
  • Row selection
  • Server-side data
  • Controlled state
  • Undo and reset
  • Refusals and errors
  • API reference
Keys and sign-in
  • Secret and publishable keys
  • Browser keys
  • JWT and OIDC
  • Session tokens
  • Identity webhook
  • Per-user limits
  • The console
  • Data and privacy
HTTP API
  • HTTP API
  • Authentication
  • Data Grid endpoint
  • Follow-up questions
  • Private mode
Reference
  • Errors
  • Limits
  • Tiers and credits
  • @gridsay/core
On this page

On this page

  1. What it needs
  2. How groups are formed
  3. Totals, pivots and charts are declined
  4. Next
Skip to the article
Start
  • Documentation
  • How it works
  • Examples
MUI X Data Grid
  • Quickstart: server route
  • From the browser
  • Using the helper
  • Filtering
  • Sorting
  • Grouping
  • Aggregation
  • Pivoting
  • Charts
  • Row selection
  • Follow-up questions
  • Refusals and errors
  • Moving from MUI’s service
  • Reference
TanStack Table
  • Quickstart
  • Describing columns
  • Filtering
  • Sorting
  • Grouping
  • Row selection
  • Server-side data
  • Controlled state
  • Undo and reset
  • Refusals and errors
  • API reference
Keys and sign-in
  • Secret and publishable keys
  • Browser keys
  • JWT and OIDC
  • Session tokens
  • Identity webhook
  • Per-user limits
  • The console
  • Data and privacy
HTTP API
  • HTTP API
  • Authentication
  • Data Grid endpoint
  • Follow-up questions
  • Private mode
Reference
  • Errors
  • Limits
  • Tiers and credits
  • @gridsay/core

Grouping

On this page

  1. What it needs
  2. How groups are formed
  3. Totals, pivots and charts are declined
  4. Next

Users name the columns to group by, and the plugin sets the table's grouping, one level per column. It groups rows; it does not add totals.

Ask

Group the tickets by team

Changes1 change
  1. 1group Team
Ask

group by country

Changes1 change
  1. 1group Country

What it needs#

TypeScript
import { assistantGroupedRowModel } from '@gridsay/tanstack-table/react';import {  columnGroupingFeature,  createExpandedRowModel,  rowExpandingFeature,  rowSelectionFeature,  tableFeatures,} from '@tanstack/react-table'; export const features = tableFeatures({  columnGroupingFeature,  groupedRowModel: assistantGroupedRowModel(),  rowExpandingFeature,  expandedRowModel: createExpandedRowModel(),  rowSelectionFeature,});
  • columnGroupingFeature, with assistantGroupedRowModel() as the groupedRowModel, in place of TanStack's createGroupedRowModel(). With TanStack's own grouped row model, the assistant is told grouping is off.
  • rowExpandingFeature and expandedRowModel, so the rows inside each group can show. Set initialState: { expanded: true } and autoResetExpanded: false on the table to keep groups open after the next answer.
  • Or manualGrouping: true, when your server groups. Then the plugin only sets the grouping state; see Server-side data.

Render group rows with row.getIsGrouped(), as the quickstart does. A count such as row.getLeafRows().length is your own code, not an answer.

How groups are formed#

assistantGroupedRowModel() takes no options and follows the table's grouping state:

  • A row with no value for a grouping column skips that level.
  • Groups keep the order of your data, whatever the filter.
  • At each level, rows that skip it come before the groups.

A column with enableGrouping: false cannot be grouped by the assistant.

Totals, pivots and charts are declined#

The plugin tells Gridsay that totals, pivots and charts are switched off, on every table, whether or not it is grouped. A question that needs one is declined:

Ask

show the total of the orders for each country

ChangesNo change
Refused

Totals per country need aggregation, which is turned off for this grid.

Your user reads this sentence. The table stays as it was.
Ask

pivot the orders: countries as columns, statuses as rows

ChangesNo change
Refused

Pivoting is disabled on this grid, so I can't build that cross-tab.

Your user reads this sentence. The table stays as it was.

The sentence is usually the assistant's own, as in these two. Only if the model's answer still uses one of them after Gridsay asks it to correct the answer does the user see a fixed sentence:

Asked forSentence
TotalsSentence"Totals are switched off for this table."
A pivotSentence"Pivoting is switched off for this table."
A chartSentence"This table has no chart."

ask resolves false, the table stays as it was, and a declined question is charged. See Refusals and errors.

Next#

  • Row selection
  • Server-side data
  • Refusals and errors