Blazor Tree Grid Example - Remote Data
ID Press Enter to sort | Title Press Enter to sort | Type Press Enter to sort | State Press Enter to sort | Progress Press Enter to sort | Created Press Enter to sort | Updated Press Enter to sort |
|---|
| No records to display |
This sample demonstrates binding remote data to the Tree Grid, enabling server-driven queries and on-demand loading of child records for scalable hierarchical rendering.
Remote binding is configured by adding SfDataManager to the Tree Grid, setting the endpoint through the Url property, and defining the transport via an Adaptor.
In this demo, parent rows are initially loaded in a collapsed state, and child records can be retrieved along with parent records by toggling the Tree Grid's LoadChildOnDemand property. This sample uses WebApiAdaptor to communicate with a Web API endpoint.
The SfDataManager, which acts as an interface between the service endpoint and the Tree Grid, requires the following minimal configuration:
SfDataManager.Url: Defines the service endpoint to fetch data.SfDataManager.Adaptor: Defines the adaptor option (example: WebApiAdaptor).
The adaptor processes requests and responses between the Tree Grid and the service endpoint. The Syncfusion.Blazor.Data namespace provides predefined adaptors for specific endpoints:
- UrlAdaptor: Base adaptor for interacting with any remote service.
- ODataAdaptor: For OData endpoints.
- ODataV4Adaptor: For OData V4 endpoints.
- WebApiAdaptor: For Web API endpoints built under OData standards.
More information on data binding can be found in the documentation section.