Persisting data in the server in Blazor DataGrid
18 Nov 20181 minute to read
The Blazor DataGrid supports persisting data changes to a server or database using RESTful web services. All CRUD operations Create, Read, Update, and Delete are managed by the SfDataManager, which enables seamless communication with server-side data sources. This configuration ensures that changes made in the Grid UI are reliably synchronized with the backend.
Supported Adaptors
The Syncfusion® provides multiple adaptors to integrate the DataGrid with various server protocols and APIs. Each adaptor works with SfDataManager to manage data operations and automatically trigger CRUD actions based on Grid interactions. Backend services must implement appropriate endpoints to handle these requests.
UrlAdaptor
The UrlAdaptor connects the DataGrid to remote services via HTTP endpoints. This adaptor is suitable for custom APIs that implement their own logic for handling CRUD operations.
- Supports manual implementation of server-side logic.
- Ideal for RESTful services with custom endpoints.
For implementation details, refer to the UrlAdaptor documentation.
ODataV4Adaptor
The ODataV4Adaptor is designed for services that implement the OData V4 specification. It provides enhanced support for advanced querying and metadata handling.
- Suitable for modern OData V4 services.
- Enables efficient data manipulation and retrieval.
For implementation details, refer to the ODataV4Adaptor documentation.
WebApiAdaptor
The WebApiAdaptor is optimized for Web APIs that follow the OData protocol. It extends the capabilities of the ODataAdaptor and simplifies integration with ASP.NET Web API services.
- Automatically maps CRUD operations to Web API endpoints.
- Useful for applications built with ASP.NET Core Web API.
For implementation details, refer to the WebApiAdaptor documentation.
GraphQLAdaptor
The GraphQLAdaptor enables integration with GraphQL servers. GraphQL allows clients to request only the data they need, improving performance and reducing payload size.
- Supports flexible and efficient data querying.
- Ideal for modern APIs using GraphQL syntax.
For implementation details, refer to the GraphQLAdaptor documentation.
NOTE
- All adaptors work with SfDataManager to manage data operations.
- CRUD operations are automatically triggered based on Grid interactions.
- Backend services must implement appropriate endpoints to handle requests.