|
|
|
|
|
|
---|---|---|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Data grid with 0 rows and 6 columns
In both Blazor Server and Blazor WebAssembly-powered applications, you can use GridDevExtremeDataSource<T> to bind our Blazor TreeList to a large dataset supplied by an HTTP service. This data source implementation is based on our DevExtreme.AspNet.Data library. When you use this data source, the TreeList component performs the following actions to optimize performance and reduce overall memory consumption:
- Loads child nodes when the node is expanded for the first time.
- Delegates data filtering operations to an underlying query provider.
- Switches FilterTreeMode to
Nodes
. In this mode, the TreeList ignores parent-child relationships and displays all nodes that meet the filter criteria at one level.
Follow the steps below to bind a TreeList to a large data collection published as an HTTP service:
- Create a GridDevExtremeDataSource<T> class instance and pass a URL to an HTTP service as the constructor parameter.
- Assign this instance to the TreeList's Data property.
- On the service side, implement an API controller. Create action methods that use the DataSourceLoader class to create a LoadResult object based on load options.
- Specify KeyFieldName, ParentKeyFieldName, and HasChildrenFieldName properties.