Overview
Use server-side mode when the dataset is too large to load in the browser, or when sorting,
filtering and pagination are handled by an API. Set the manual* options and pass controlled
state to useDataGrid.
Server-side sorting
Set manualSorting to disable client-side sorting. Use controlled sorting and
onSortingChange to send the sort state to your API:
Server-side filtering
Set manualFiltering to disable client-side filtering. Use controlled columnFilters
and onColumnFiltersChange to send the filter state to your API. The grid renders no filter
inputs in this mode, bind your own controls to the store filter methods, see Filtering:
Server-side pagination
Set manualPagination and provide rowCount with the total number of rows. DataGrid.Footer
uses it to display the 1–10 of 200 range and the page count:
Full example
Server-side sorting, filtering and pagination with a simulated API delay. With
loadingVariant="bar", the current rows stay visible while the next page is fetched.
See States for the other loading variants:
Server-side grouping
Set manualGrouping in tableOptions to disable client-side grouping. Use controlled
grouping and onGroupingChange to send the grouping state to your API:
Debounced filtering
Debounce the filter value to avoid sending a request on every keystroke:
Stable row IDs
Always provide getRowId when server-side pagination is used together with row selection.
Without it, selection is keyed by row index and breaks when the page changes:
Filter options from the API
With server-side filtering, withFaceting only sees the current page. Get the available filter
values from your API and pass them to your own filter controls, for example a Select in the toolbar:
Empty results
The emptyState payload reports rowCount from the rowCount option, so a server-side grid can
tell an empty data source from an empty page of results, see States.