- Home
- Forum
- Angular - EJ 2
- Remote data but sort/filter locally?
Remote data but sort/filter locally?
Hello,
I'm loading data remotely however, some of the columns are computed so I can't sort on them in the API. Is there a way to have sorting/filtering work only on the current page of data, and then only have paging trigger an API call?
Thanks,
- You can set the ‘offline’ property as ‘true’ in the data manager instance. On enabling this property the entire data will be fetched in the initial request itself and all the consecutive actions will be performed in the client-side(considering it as a local data). More details on this can be checked in the below documentation link,
- You can use the remote save adaptor which allows you to bind the entire data to the Grid with initial server request on render and all the Grid actions will be performed in client-side except the CRUD actions(for which server request will be sent). More details on the remote save adaptor can be checked in the below help documentation link,
- You can use ajax call to send request to your back end along with the required input values, return back the data to the client, parse the returned data to JSON format and bind it to the Grid’s dataSource property. This will be considered as local data in the Grid. More details on this can be checked in the below documentation link,
Thanks, I'll review the options
Hello,
As I have noticed, nothing works on the grid on the client-side if WebApiAdaptor were to be used.
However, using "Offline: true" as an option isn't a solution either, because I retrieve the data by giving out a query with it. And "Offline" makes the grid ignore the query param addition for some reason.
And isn't it more optimal to do those sort of things ( Sort, Filter, and search ) on the client-side rather the sever's?
Is there really no other solution with WebApiAdaptor?
- 5 Replies
- 3 Participants
-
SP Scott Price
- Aug 3, 2021 07:15 PM UTC
- Feb 10, 2022 07:17 AM UTC