Example of URL Adaptor in ASP.NET Core Data Grid Control

In this sample, the UrlAdaptor is used for binding the data source from controller actions. To perform the grid actions like paging, filtering, sorting at server side we can use DataOperations class.

DEMO
SOURCE

The UrlAdaptor is the base adaptor that would interact with remote services. Here the datasource will be loaded on-Demand concept. In server-side the DataManagerRequest class helps in binding the Grid queries passed to the server-side. Based on those queries you can perform server-side operation on the Grid data. The query parameters that help you perform the server-side operations are as follows.

  • RequiresCounts - If it is true then the total count of records will included in response.
  • Skip - It holds the number of records to skip.
  • Take - It holds the number of records to take.
  • Sorted - It contains details of current sorted column and its direction.
  • Where - It contains details of current filter column name and its constraints.

The following grid action can be performed using DataOperations class under the following server side methods.

  • PerformSkip - Bypasses a specified Skip value and returns the remaining collections of records.
  • PerformTake - Bypasses a specified Take value and returns the remaining collections of records.
  • PerformFiltering - Filters a sequence of records based on a predicate.
  • PerformSorting - Sorts the collections of records based on its direction.
  • PerformSearching - Search the records based on a predicate.

Transform your ASP.NET Core web apps today with Syncfusion ASP.NET Core components
85+ high-performance and responsive UI components
Dedicated support
Hassle-free licensing
TRY IT FOR FREE