Databind grid to web api service

Hi,

Referring to your documentation located at https://help.syncfusion.com/aspnetmvc/grid/data-binding in the Web API Service it tells us that we have to return objects from this call... Is there a way we can return ienumerable in Json form and bind it to the grid ?

We want to avoid doing below
"The datasource from Web API 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."

We already have a built api and this is not suitable for us.

Thanks.

2 Replies

FR Fraser February 22, 2018 11:12 AM UTC

I believe this is raised in the wrong section sorry.

New thread : https://www.syncfusion.com/forums/136057/databind-grid-to-web-api-service


KM Kuralarasan Muthusamy Syncfusion Team February 23, 2018 10:52 AM UTC

Hi Fraser, 

Thanks for contacting Syncfusion support.  

We have analyzed your query and we found that you want to return Json result only on Web API service. If you return Json result only on Web API the data’s will be bounded to the Grid but the other actions like sorting, filtering, paging will not be performed in the server-end. Because this actions all are depends on the Items and Count values. Henceforth, these actions will be done by Grid in the client-end. So, you have to set the property offline as true in the DataManager.  

Please refer the following link to know about offline support: https://help.syncfusion.com/aspnetmvc/datamanager/advancedfunctionalities#offline-support 

If you need further assistance please get back to us, 

Regards, 
Kuralarasan M.  

Loader.
Up arrow icon