2 Answers, 1 is accepted
Hi, Ozgur,
The helper method `toODataString` used in the example (https://www.telerik.com/kendo-react-ui/components/grid/data-operations/odata-server-operations/) does not support grouping and if you want to include it in the query, you should add it manually to the query string (using the information from the DataState).
I hope this helps.
Regards,
Wissam
Progress Telerik
Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Kendo family, check out our getting started resources!
Thanks a lot for your reply.
But as far as I understand I am able to group on client side, right?
Is Kendo Grid support both paging and grouping with OData (or remote data )?
I treid to have both paging and grouping with OData over your above example but I couldn't.
My code is below, the problem is that I set products in dataReceived method using setProducts despite it sets
products I couldn't access data in onDataChange method always it returns empty . Why?
Hi, Ozgur,
Mixing the server-side data state changes such as paging and sorting with client-side grouping is not possible. In order to have grouping with oData server operations, I would suggest fetching the oData data on the client side and applying all the data state changes there:
In addition, grouping can be done by manually adding the group to the query. For example, the below URL groups the data by `ProductName`:
const baseUrl = 'https://demos.telerik.com/kendo-ui/service-v4/odata/Products?$count=true&$apply=groupby((ProductName))&';
However, since grouping with oData is not supported for the KendoReact Grid, and will return meaningless data in the component. For this to work, it will require returning a data structure that the Grid expects:
For more information about client-side state management (local data operations), you can check the following article:
I hope this helps.
Regards,
Wissam
Progress Telerik
Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Kendo family, check out our getting started resources!