item)
{
- var args = new Radzen.GroupRowRenderEventArgs() { Group = item.Group, FirstRender = firstRender };
+ var args = new Radzen.GroupRowRenderEventArgs() { Group = item.Group, FirstRender = firstRender, Expandable = item.GroupResult.Count > 0 };
if (GroupRowRender != null)
{
diff --git a/Radzen.Blazor/RadzenDataGridGroupRow.razor b/Radzen.Blazor/RadzenDataGridGroupRow.razor
index b3877042..223e79f7 100644
--- a/Radzen.Blazor/RadzenDataGridGroupRow.razor
+++ b/Radzen.Blazor/RadzenDataGridGroupRow.razor
@@ -26,9 +26,12 @@
}
|
- Grid.ExpandGroupItem(this, rowArgs?.Item1.Expanded))">
-
-
+ @if (rowArgs?.Item1.Expandable == true)
+ {
+ Grid.ExpandGroupItem(this, rowArgs?.Item1.Expanded))">
+
+
+ }
|
}
diff --git a/RadzenBlazorDemos/Pages/DataGridGroupingApi.razor b/RadzenBlazorDemos/Pages/DataGridGroupingApi.razor
index 2fae837b..362615a3 100644
--- a/RadzenBlazorDemos/Pages/DataGridGroupingApi.razor
+++ b/RadzenBlazorDemos/Pages/DataGridGroupingApi.razor
@@ -85,6 +85,8 @@
{
args.Expanded = allGroupsExpanded != null ? allGroupsExpanded : false;
}
+
+ args.Expandable = args.Group.Data.Key != "Vice President, Sales";
}
void OnGroupRowExpand(Group group)
|