On-demand loading

GridControl

Fetch rows, groups and totals as users need them, never the whole table at once.

Overview

On-demand loading lets a Blazor GridControl show an order history too large to load at once, fetching only what users scroll to or open. Set an ItemsProvider instead of DataSource: the grid calls it for each scroll window, sort, search or export with a GridItemsRequest, and you answer from your database or API with the items and a total. EnableProviderGrouping pages the group tree the same way.

Examples

#Twelve thousand orders, loaded group by group

Open a region, then a category, then Load more: each step sends one request to a provider behind a 90 ms delay, and Export all pages through every matching order with progress and Cancel.

Region ×Category ×
RegionCategoryOrder Customer Date Qty Amount
No records to display
0 rows

Waiting for the first request…

Documentation

PropertyTypeDefaultDescription
StartIndexint—Zero-based index in the complete filtered and sorted result.
Countint—Maximum number of rows requested.
QueryVersionlong—Increases with every query or context change; results from an older version must not be applied.
IncludeTotalCountbool—True when the grid needs an authoritative total for this query generation, so a provider can skip a repeated count.
QueryGridQueryDescriptor—The current sorts, filters, search text and grouping; the next table.
ContextKeyobject?—Opaque host value for the surrounding dataset, passed through uninterpreted.
CancellationTokenCancellationToken—Canceled when a newer range or query supersedes the request.
PurposeGridItemsRequestPurposeRowsWhy the range is requested: Rows, Groups, GroupChildren, GroupItems, Export or FilterValues.
GroupRequestGridProviderGroupRequest?nullParent group for lazy grouping requests; null for row windows, root groups and exports.
FilterFieldstring?nullField whose distinct values are requested for a FilterValues request; null otherwise.
An unhandled error has occurred. Reload 🗙

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.