Data Operations guide

Sorting data grid documentation

Sorting changes row order. This page shows how one sort rule and stacked sort rules change the same table in client and server mode.

What it means

Sorting changes row order. It is one of the fastest ways to turn the same table into a ranking, triage list, or review queue.

When to use it

Use `sortColumn` + `sortDirection` when the page only needs one active ranking at a time. Use one sort rule when users mainly care about one ranking, such as highest revenue or lowest margin. Use more than one rule when the page needs a stable review order, such as status and then revenue.

Implementation notes

Keep the default order aligned with the main question users bring to the page. If the final data comes from the server, test the same sort UX in server mode before shipping.

Relevant API

Start with sorting.sortMode, sorting.sortColumn, sorting.sortDirection, sorting.sortModel, sorting.enableMultiSort, sorting.onSort, sorting.onSortModelChange, sorting.multiSortKey. Open the live API reference for types and defaults.