- Notifications
You must be signed in to change notification settings - Fork0
SyncfusionExamples/connecting-databases-to-angular-grid
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
This section describes how to connect and retrieve data from a Microsoft SQL Server database usingMicrosoft.Data.SqlClient and bind it to the Syncfusion Angular Grid.
Microsoft SQL Server database can be bound to the Grid in different ways (i.e.) usingdataSource property, custom adaptor and remote data binding using various adaptors. In this documentation, two approaches will be examined to connect a Microsoft SQL Server database to a Grid. Both the approaches have capability to handle data and CRUD operations with built-in methods as well as can be customized as per your own.
1. Using UrlAdaptor
TheUrlAdaptor serves as the base adaptor for facilitating communication between remote data services and an UI component. It enables the remote binding of data to the Syncfusion Angular Grid by connecting to an existing pre-configured API service linked to the Microsoft SQL Server database. While the Grid supports various adaptors to fulfill this requirement, includingWeb API,ODataV4,UrlAdaptor, andGraphQL, theUrlAdaptor is particularly useful for the scenarios where a custom API service with unique logic for handling data and CRUD operations is in place. This approach allows for custom handling of data and CRUD operations, and the resultant data returned in theresult andcount format for display in the Grid.
2. Using CustomAdaptor
TheCustomAdaptor serves as a mediator between the UI component and the database for data binding. While the data source from the database can be directly bound to the Syncfusion Angular Grid locally using thedataSource property, theCustomAdaptor approach is preferred as it allows for customization of both data operations and CRUD operations according to specific requirements. In this approach, for every action in the Grid, a corresponding request with action details is sent to theCustomAdaptor. The Grid provides predefined methods to perform data operations such assearching,filtering,sorting,aggregation,paging andgrouping. Alternatively, your own custom methods can be employed to execute operations and return the data in theresult andcount format for displaying in the Grid. Additionally, for CRUD operations, predefined methods can be overridden to provide custom functionality. Further details on this can be found in the later part of the documentation.
Here, we have explained in detail how to bind the listed databases below to the Blazor DataGrid component using CustomAdaptor and UrlAdaptor.
- Microsoft SQL Server Database
- MYSQL Database
- PostgreSQL Database
- Dapper
- SQLite
- Entity Framework
About
A suite of projects that enable data binding and CRUD action handling in the Syncfusion Angular Grid from various databases using CustomAdaptor and UrlAdaptor.
Topics
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors4
Uh oh!
There was an error while loading.Please reload this page.