Hi AFIVEB,
Thanks for your update.
In our default Grid architecture, while using the
UrlAdaptor, we need to return the data as JSON from the controller action and the JSON object must contain a property as
result with dataSource as its value and one more property
count with the dataSource total records count as its value. This is our default behavior.
UrlAdaptor Documentation:
https://ej2.syncfusion.com/vue/documentation/grid/edit/#url-adaptor
We also have custom binding approach to bind data in the Grid. With this you can bind data from an API call by providing your own custom queries(as required by your API) and handle all the Grid actions(Sort, Page, Filter, etc. ) with it.
For using custom binding also, we need to bind the response data(Grid data) returned from your API as an object of result(JSON data source) and count(Total data count) properties and set it to the Grid’s dataSource property.
{
result: [{..}, {..}, {..}, ...], //JSON data source
count: Total data count
} |