title: How-To: Server-side Pagination description: Fetch large datasets from a server using PageCacheDataSource and FetchConfig.
This guide shows how to connect rs-grid to a REST API that paginates data server-side. The grid fetches pages on demand and shows skeleton cells while loading.
Prerequisites
Add the web crate to your Cargo.toml:
1. Build a GridModel in server-side mode
2. Mount the grid and enable async fetch
3. Expected API response shape
How it works
- The grid calculates which rows are in the viewport.
- For each unseen page, it calls
build_urland fetches it. - While a page loads, affected cells show
CellStatus::Loading(skeleton). - When the response arrives,
parse_responseconverts it toPageFetchResponse. - The grid calls
GridCommand::NotifyPageLoadedinternally and re-renders.
Sorting and filtering server-side
When model.mode = DataSourceMode::ServerSide, sort and filter commands
(ToggleSort, SetColumnFilter, etc.) update GridState but do not
reorder rows locally. Your build_url receives the current sort and filters
via PageFetchRequest:

