The property Expanded in GroupRowRenderEventArgs is always null. #459

Open
opened 2026-01-29 17:37:40 +00:00 by claunia · 0 comments
Owner

Originally created by @OndrejUzovic on GitHub (Jul 10, 2022).

When the event GroupRowRenderEventArgs the property Expanded is always null, even if the row has already been expanded.
The problem is the property Expanded is not initialized when the event is being instantiated:

var args = new Radzen.GroupRowRenderEventArgs() { Group = item.Group, FirstRender = firstRender };

Would it be possible to update the code to set Expanded to true if it is expanded?

So the code in the responsible method would be:

internal Tuple<GroupRowRenderEventArgs, IReadOnlyDictionary<string, object>> GroupRowAttributes(RadzenDataGridGroupRow<TItem> item)
{
	var args = new Radzen.GroupRowRenderEventArgs()
	{
		Group = item.Group,
		FirstRender = firstRender,
		
		// Initialization of expanded
		Expanded = IsGroupItemExpanded(item)
	};

	if (GroupRowRender != null)
	{
		GroupRowRender(args);
	}

	return new Tuple<GroupRowRenderEventArgs, IReadOnlyDictionary<string, object>>(args, new System.Collections.ObjectModel.ReadOnlyDictionary<string, object>(args.Attributes));
}
Originally created by @OndrejUzovic on GitHub (Jul 10, 2022). When the event GroupRowRenderEventArgs the property Expanded is always null, even if the row has already been expanded. The problem is the property Expanded is not initialized when the event is being instantiated: `var args = new Radzen.GroupRowRenderEventArgs() { Group = item.Group, FirstRender = firstRender };` Would it be possible to update the code to set Expanded to true if it is expanded? So the code in the responsible method would be: ``` internal Tuple<GroupRowRenderEventArgs, IReadOnlyDictionary<string, object>> GroupRowAttributes(RadzenDataGridGroupRow<TItem> item) { var args = new Radzen.GroupRowRenderEventArgs() { Group = item.Group, FirstRender = firstRender, // Initialization of expanded Expanded = IsGroupItemExpanded(item) }; if (GroupRowRender != null) { GroupRowRender(args); } return new Tuple<GroupRowRenderEventArgs, IReadOnlyDictionary<string, object>>(args, new System.Collections.ObjectModel.ReadOnlyDictionary<string, object>(args.Attributes)); } ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#459