Blazor DataGrid Example - Lazy Load with Paging
Order ID | ProductID Press Ctrl space to group | Product Name Press Ctrl space to group | Customer ID Press Ctrl space to group | Units In Stock Press Ctrl space to group |
|---|
This sample demonstrates lazy loading with grouping and paging in the DataGrid for efficient data handling.
The Blazor DataGrid is configured for lazy loading by:
- Setting the EnableLazyLoading property to true in the GridGroupSettings
- Enabling paging by setting the AllowPaging property to true
Control the number of records per page using the PageSize property in GridPageSettings.
In this demo:
- Data is initially grouped by the Product Name column
- Only collapsed caption rows are displayed initially
- When expanding a caption row, grouped records are loaded dynamically based on the defined page size
- This approach avoids rendering entire datasets at once, improving performance with large datasets
For more detailed information about lazy loading with grouping, refer to the lazy load grouping documentation.