Hi,
I would like to have a Expand/Collapse All Grid Groups button in the Grid Header. I know this is possible to do so programmatically outside of the grid but my users want it inside the Grid.
Thanks,
Humayoon
Hi all,
Indeed, currently the described UX can be implemented through the Grid State and the SetStateAsync() method.
Here are two important notes:
Regards,
Dimo
Progress Telerik
Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.
We'd love this feature more widely supported than the manual way to do this now. We've just created this UI for it, but we have tons of grids, going to be a huge time sink to support all grids.
using version 6.2
I have a button. If my items are already grouped, I can do the following:
```
private async Task ExpandCollapse()
{
_isExpanded = !_isExpanded;
var state = _grid.GetState();
if (_isExpanded)
{
state.CollapsedGroups = null;
state.ExpandedItems = _alerts;
}
else
{
state.CollapsedGroups = Enumerable.Range(0, _items.ToList().Count).ToList();
}
await _grid.SetStateAsync(state);
}