Server-Side Paging/Searching/Filtering using WebApiAdaptor

Hi @Support,
 I want to Apply server-side paging/filtering/searching, like when I move to the next page new data should retrieve from the database. I'm using WebAPIAdaptor and receiving data on the backend using ODataRawQueryOption but getting the values null. But On Execution, Getting null values of take/skip/search, etc. I made allow sorting/searching/paging to TRUE in Grid config.
How can I get data in the controller using WebAPiAdaptor?


1 Reply

PS Pon Selva Jeganathan Syncfusion Team July 7, 2022 03:02 PM UTC

Hi Mohammad Usman,


Thanks for contacting syncfusion forum.


Query:  On Execution, Getting null values of take/skip/search, etc. I made allow sorting/searching/paging to TRUE in Grid config.How can I get data in the controller using WebAPiAdaptor?


We checked your query by preparing a sample, but we were unable to reproduce the issue at our end. We suspect that you are enabling the offline property in the data source. While enabling this offline property, the grid can be used to load all data from a remote service in a single request, and all further grid actions will be performed client-side on the cached data. So, this issue may have occurred. So, we suggest you disable this offline property in the data source.


Please refer to the below sample:

https://www.syncfusion.com/downloads/support/directtrac/general/ze/WebApiSample1742565007


Please refer to the below screenshot:

While filtering:



While paging:





While Sorting:





After following the above solution still faced issue, share us the following details.


  1. Share the complete grid code example
  2. Share your product version details. 
  3. Share us issue reproducible sample or reproduce the issue in the above sample


The provided information will be helpful to provide you response as early as possible. 


Kindly get back to us for further assistance.


Regards,
Pon selva



Loader.
Up arrow icon