Blazor DataGrid Example - Lazy Load with Infinite Scrolling
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 load grouping with infinite scrolling in the DataGrid for efficient handling of large grouped datasets.
The Blazor DataGrid is configured for lazy load grouping with infinite scrolling by setting:
- EnableLazyLoading property to true in the GridGroupSettings
- EnableInfiniteScrolling property to true
In this demo, data is grouped by the Product Name column, rendering only collapsed caption rows initially.
When you expand a caption row, the corresponding grouped data is loaded on-demand. This approach:
- Avoids buffering entire grouped datasets
- Loads only relevant data visible in the viewport
- Enables efficient handling of large grouped data without performance degradation
The next set of data is loaded based on the PageSize property from GridPageSettings.
Important: The Height property must be defined when enabling infinite scrolling.
For more detailed information about lazy load grouping with infinite scrolling, refer to the lazy load grouping documentation.