Convert my datatables code to use syncfusion jquery grid

Dears

hope you are fine

I need your help to check if syncfusion grid be replaced in my code

e.g.

my api get all url: api/services/app/AccountStatus/GetAll

e.g request url: 

https://localhost:44301/api/services/app/AccountingMethod/GetAll?IdFilter=1&IsActiveFilter=true&Filter=AM00&Sorting=CreationTime%20DESC&MaxResultCount=10&SkipCount=0


the api take object like below image

IdFilter: id of the record if need to return 1 record

IsActiveFilter: boolean true, false or null (means all records)

Filter: the text filter if user type in the text box 

Sorting: sort column and sort type 

MaxResultCount: page size of the grid

SkipCount: page number

api input.PNG


after execute the api, it will return records in the following format, like below image

result.PNG


screen image



when click search button it send to api to get the data

how can I do this in syncfusion grid?

Thanks


1 Reply

PS Pon Selva Jeganathan Syncfusion Team December 23, 2021 04:55 AM UTC

Hi Jas, 
 
Thanks for contacting syncfusion support. 
 
Query: how to make datamanager with custum result and mapping the filters 
 

Based on your query, we suggest you use the web api adaptor of the grid. Using webapi adaptor, you can bind WebApi service data to Grid. The data from WebApi service must be returned as object that has property items with its value as datasource and another property count with its value as dataSource’s total records count.

 

Please refer to the below documentation,

https://help.syncfusion.com/js/grid/data-binding#webapi

 

Please refer to the below KB documentation

https://www.syncfusion.com/kb/8434/server-side-api-for-datamanager-operations-with-iqueryable-data

https://www.syncfusion.com/kb/8251/search-operation-using-webapi-service

 

Kindly get back to us for further assistance. 
 
Regards, 
Pon selva 
 


Loader.
Up arrow icon