gridcn2.0.0
Data modes

Data mode guide

Pick how the grid gets its rows, and decide whether the grid or your server applies the sort, filter, and search text.

A data mode is one way the grid gets its rows. The mode also decides who applies the sort, the filter, and the search text. Use the two tables below to pick both.

Pick the strategy for your data

Your dataData modeStart here
The browser holds every row.Local arrayRender your first grid
The browser holds every row and shows one page at a time.Client paginationClient pagination
Your API returns one page for each request.Pages modeLoad rows by page
You fetch the pages yourself, for example with a cache.Own fetch with useDataGridServerPagerFetch the pages yourself
Your API reads rows by offset and returns the row count.Scroll mode, random accessLoad rows while scrolling
Your API returns a next cursor and no row count.Scroll mode, sequential sourceLoad without row count

Live values add to any of these modes. See Push live values. One grid cannot use scroll mode and pagination together.

Pick where the spec runs

The spec is what the user chose: sorts, filters, and searchText.

Local arrayServer mode
Who applies the specThe grid, over dataYour server
Mode propsThe defaultssortMode="server" and filterMode="server"
Rows the grid holdsAll of dataA page or the loaded blocks

useDataGridServerRows sets both mode props for you. When data holds only part of the result, run the spec on the server. A client sort or filter cannot see the rows the grid never fetched, and it warns once in development.

Query server rows shows how the server reads the spec. Move from client rows to server rows lists what changes for a grid that leaves the local array. Data mode support lists each feature per mode.

On this page