Any plans for an expand/collapse all feature for RadzenDataGrid's grouping?
If not already I would like to request that as a feature.
Maybe the GroupResult items found in RadzenDataGrid.GroupedPagedView could have a modifiable "IsExpanded" property that I could manage myself?
Alternative could be something like exposing the collection of RadzenDataGridGroupRows with a modifiable "IsExpanded" property that I could manage myself.
Another alternative, albeit less flexible, could be a simple ExpandAllGroups()/CollapseAllGroups() function on the RadzenDataGrid itself
We will do our best to provide way to expand groups runtime in our next update.
Any update on this? Looking forward to using this as well.
You can use GroupRowRender to set if group is expandable or not:
But how can be done at runtime in a massive way?
This is exactly how expanding item(s) can be done runtime.
Sorry but I haven't understood how to do
I would like ho have a button/checkbox extra grid that makes collapse / expand all first level group.
Just set a variable on your button click and reload the DataGrid. You can check in this event the value of this variable.
I see al least two problems doing this way:
- reloading the grid loses all selection done on the rows item (cell with checkboxes for examples) unless I save selections before each expand/collapse all click (it's very uncomfortable or impossibile to do that depending on use cases)
- how can I then expand / collapse a single row if my GroupRowRender is driven by the button variable? I have to disable (like with a tristate checkbox) the collapse / select all and only if my variable is now null I can operate on a single row (again very uncomfortable)
We are open for more comfortable ways, feel free to open a pull request with better more suitable for your case implementation. We will review your code and if it’s usable and doesn’t brake any existing scenario we will merge it.