Example of Remote Data in Blazor DataGrid Component
This sample demonstrates the way of binding remote service data to DataGrid component.
Order ID | Customer ID | Order Date | Freight | Ship Country |
---|
No records to display |
Data binding is supported by the Blazor DataGrid. DataGrid can be configured to bind remote data using the SfDataManager component.
To properly interact with the service endpoint, the SfDataManager
, which will act as an interface between the service endpoint and the DataGrid, will require the following minimal information.
- Url - Defines the service endpoint from which the data will be retrieved.
- Adaptor - This option specifies the adaptor. For remote binding, here WebApiAdaptor is used. Defines the adaptor option.
The adaptor is in charge of processing responses and requests from and to the service endpoint. The namespace Syncfusion.Blazor.Data includes some predefined adaptors that are intended to interact with specific service endpoints. The predefined adaptors are as follows:
- UrlAdaptor - This can be used to interact with any remote service. This adaptor serves as the foundation for all remote-based adaptors.
- ODataAdaptor- This is used to interact with OData endpoints.
- ODataV4Adaptor - This is used to interact with OData v4 endpoints.
- WebApiAdaptor - Use this to interact with Web APIs developed in accordance with OData standards.
Remote data is bound in this demo by assigning service data as an instance of the SfDataManager
component.
More information about the Remote data binding feature can be found in this documentation section.