I would like to group a Dataview. Maybe by creating multiple dataviews on the page when user selects group by. Is there a way to do so. Is there a way to group dataview items
Hey @sckaram, first of all, I'd like to note that grouping is inherently only supported by hierarchical data, so in the case of dataview it is really not recommended to try and group the items. You should look towards views that support hierarchical data and therefore, grouping (views like groulist, tree, treetable).
However, if you absolutely must use a dataview, you could technically still group data. To do this, you would need to:
Use a TreeCollection
Extend your TreeCollection with grouping API
Sync your collection with your dataview
This way, you'll have to perform all of your manipulations with data using the collection itself, not the dataview. Here's an example: https://snippet.webix.com/9pm2tryl.
Also one major drawback of this is that you won't be able to perform dynamic loading since we're using a TreeCollection and are grouping the data on our side (meaning that we need to have all of the data preloaded on the client side to perform grouping).
If you have to use dynamic loading you will be better off writing your own grouping method on the backend.
It looks like you're new here. If you want to get involved, click one of these buttons!