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. Which rows are selected
  3. Only loaded rows
  4. What it will not do
  5. 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

Row selection

On this page

  1. What it needs
  2. Which rows are selected
  3. Only loaded rows
  4. What it will not do
  5. Next

Users ask for the top rows, and the plugin sorts the table and selects the first rows in the order shown. The other rows stay, unless the question also names a condition: then the answer filters too, as in the third example.

Ask

select the top three by total

Changes2 changes
  1. 1sort Total, largest first
  2. 2select the first 3 rows
Ask

select the five newest orders

Changes2 changes
  1. 1sort Placed, newest first
  2. 2select the first 5 rows
Ask

select the two biggest orders from Germany

Changes3 changes
  1. 1filter Country is Germany
  2. 2sort Total, largest first
  3. 3select the first 2 rows

What it needs#

Register rowSelectionFeature, and leave enableRowSelection on (not false). The grouping setup registers it:

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,});

Show the selection: highlight rows or check boxes bound to row.getIsSelected(). The quickstart's table gives selected rows a selected class for your styles.

Give rows a stable id from your data, so a selection stays on the same records when the data changes:

TypeScript
getRowId: (row) => row.id,

TanStack's default row ids are positions.

Which rows are selected#

  • The first data rows in the sorted order, inside groups too. Group rows are skipped.
  • Read before paging and expanding: rows on later pages and in closed groups count, when the table holds them.
  • The answer's selection replaces the table's selection. An answer that selects nothing leaves the selection alone.
  • Asking for more rows than the table holds selects all of them.

Only loaded rows#

The plugin selects among the rows your table holds. With paging on your server, it cannot reach rows that are not loaded, so "the top three" means the top three loaded rows. When the answer also changes a sort your server runs, the plugin selects from the rows loaded at that moment; it does not wait for your fetch. See Server-side data.

The plugin writes the selection state directly. A per-row enableRowSelection function is not consulted, so check permissions before you act on selected rows. Selected rows are not sent to Gridsay.

What it will not do#

  • Select when selection is off. If an answer asks to select rows while selection is off, Gridsay returns select: -1 without an error. The plugin leaves the existing selection alone.
  • Clear or change a selection by itself. It only selects the top rows of the current order.
  • Fetch rows from your server to select them.

Next#

  • Undo and reset
  • Server-side data
  • Sorting