Data Sources Overview
The DataSource trait
All row data in rs-grid is accessed through the DataSource trait:
This abstraction allows rs-grid to work with in-memory data, virtual (computed) data, or server-side paginated data through the same interface.
CellStatus
The renderer uses CellStatus to decide whether to draw the cell value,
a skeleton loading placeholder, or nothing.
Built-in implementations
Note
*FnDataSource is read-only, but edits still work via the patches layer
in GridModel. See Data Model for details.
Client-side vs Server-side mode
Set model.mode to control where sort/filter logic runs:
In server-side mode, your application is responsible for:
- Listening to sort/filter changes
- Fetching new data from the server
- Updating the
PageCacheDataSource - Sending
NotifyPageLoadedto trigger re-render