Datagrid Grouping Collapsed by Default

Hello there,

Thanks for all the hard work you do. I can certainly appreciate all of your efforts.
Would be possible to have an option in the Datagrid Grouping as to what you want the initial load default to be expanded or collapsed (bool)?
I.E GroupCollapsed="true/false"

Thanks in advance.

Check this demo:


This is not by default though.
I was thinking more the way the HeaderTemplate is setup:

However, in this example, which at the moment it doesn't work, because the args.FirstRender is always null as mentioned in another post by another user.
I was wondering as if this was more of an option out-the-box instead.

Looks like you misunderstood the example completely. There is a boolean property AllGroupsExpanded - all you need is to set it to false:


datagrid-collapsed-groups

Oh, darn. I sure did miss that property in there.
Thank you so much for clarifying it. I appreciate!

THIS PROPERTY IS NOT SUPPORTED IN RadzenDataGrid WHEN USING GroupHeaderTemplate. I want all rows to be collapsed by default. However, the issue lies in this function where args.expanded is always null, and args.FirstRender is false always when trigger @OnGroupRowRender. How can I handle this? I've tried all other methods for default collapse. The main issue occurs when I set expand=false by default; then it won't expand on clicking the side group arrow. protected void OnGroupRowRender(GroupRowRenderEventArgs args)
{
//always false on grouprendring
if (args.FirstRender)
{
args.Expanded = false;
}
},

The property works no matter if this template is defined or not.