Use Telerik DataSourceRequest from Kendo Grid on an Angular project and DataSourceResult on the server
These sample projects showcase how you can send Kendo Grid for Angular state to an asp.net core server, so you can retrieve and shape the data easily.
The showcase consists of an angular part that uses the Kendo Grid and the API toDataSourceRequestString
from @progress/kendo-data-query
to serialize the state of the grid and use it as a query string for the call to the asp controller .net core.
The server, composed of an asp.net core 5.0 application, implements a custom binder called DataSourceRequestBinder
to be able to bind the query string generated by the client into a DataSourceRequest object.
The DataSourceRequest is then used to execute queries (pagination, sort, and filter) on a dynamically generated IEnumerable.
PS: the DataSourceRequestBinder
is not complete and some features may not be correctly deserialized (ex: Groups and Aggregate).
- Install dependencies for client app (npm install) and server app (nuget restore)
- Serve client app using
ng serve
- Start server app using visual studio
- Open http://localhost:5000.
These sample projects were created by Loccioni's web team.