Server side paging

Hi,

I'd like to know how can I achieve server side pagination with the grid? Currently, I dont use OData but Rest and want to do it programmatically at client side.
What properties can I use to set the count and provide the data, so that the pager shows the correct number of pages and records?


1 Reply 1 reply marked as answer

RS Rajapandiyan Settu Syncfusion Team May 28, 2021 08:59 AM UTC

Hi Dave, 
 
Thanks for contacting Syncfusion support. 
 
Based on your query, you want to load the data from the Restful service. You can achieve your requirement by using WebApi Adaptor. We would like to share the behavior of WebApi Adaptor. 
 
The WebApi adaptor works based on the on-demand concept. When we perform any Grid actions like Paging, Filtering, Sorting, etc., we generate the correspond queryString with respect to the webapi service and send it to the server. Here, you can perform your operation in your data using the querySting and return required data to Grid. 
 
WebApiAdaptor expects JSON response from the server and the response object should contain properties Items and Count whose values are collection of entities and total count of the entities respectively. 
The sample response object should look like below. 
 
 
{ 
    Items: [{..}, {..}, {..}, ...], 
    Count: 830 
} 
 
 
Find the below documentation and demo for more information. 
 
 
Please get back to us if you need further assistance with this. 
 
Regards, 
Rajapandiyan S 


Marked as answer
Loader.
Up arrow icon