Datagrid grouping collapses on row select #1028

Closed
opened 2026-01-29 17:47:59 +00:00 by claunia · 2 comments
Owner

Originally created by @maria-g-codes on GitHub (Oct 31, 2023).

Description
I noticed this issue when updating Radzen from 4.9.1 --> 4.19.1. When I have a datagrid with grouping and selection and I select a row, the datagrid collapses. This severely impacts the ability to inline edit!

I have noticed that this happens with these specific properties:
AllowGrouping="true" AllGroupsExpanded="false" SelectionMode="DataGridSelectionMode.Single"

Steps to reproduce the behavior:

  1. Navigate to https://blazor.radzen.com/datagrid-single-selection
  2. Change the Datagrid properties to:
<RadzenDataGrid AllowFiltering="true" FilterPopupRenderMode="PopupRenderMode.OnDemand" FilterCaseSensitivity="FilterCaseSensitivity.CaseInsensitive" AllowPaging="true" PageSize="4"
            AllowSorting="true" AllowGrouping="true" AllGroupsExpanded="false" Data="@employees" TItem="Employee" ColumnWidth="200px"
            SelectionMode="DataGridSelectionMode.Single" @bind-Value=@selectedEmployees>
  1. Add a grouping to the grid.
  2. Expand a group (or multiple groups) and click on a row.
  3. Notice that any and all grouping collapses when a row is clicked.

Expected behavior
When clicking on a row, nothing changes to the grouping.

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: Chrome
  • Version: Chrome 118.0.5993.118
Originally created by @maria-g-codes on GitHub (Oct 31, 2023). **Description** I noticed this issue when updating Radzen from 4.9.1 --> 4.19.1. When I have a datagrid with grouping and selection and I select a row, the datagrid collapses. This severely impacts the ability to inline edit! I have noticed that this happens with these specific properties: AllowGrouping="true" AllGroupsExpanded="false" SelectionMode="DataGridSelectionMode.Single" **Steps to reproduce the behavior:** 1. Navigate to https://blazor.radzen.com/datagrid-single-selection 2. Change the Datagrid properties to: ``` <RadzenDataGrid AllowFiltering="true" FilterPopupRenderMode="PopupRenderMode.OnDemand" FilterCaseSensitivity="FilterCaseSensitivity.CaseInsensitive" AllowPaging="true" PageSize="4" AllowSorting="true" AllowGrouping="true" AllGroupsExpanded="false" Data="@employees" TItem="Employee" ColumnWidth="200px" SelectionMode="DataGridSelectionMode.Single" @bind-Value=@selectedEmployees> ``` 3. Add a grouping to the grid. 3. Expand a group (or multiple groups) and click on a row. 4. Notice that any and all grouping collapses when a row is clicked. **Expected behavior** When clicking on a row, nothing changes to the grouping. **Desktop (please complete the following information):** - OS: Windows 10 - Browser: Chrome - Version: Chrome 118.0.5993.118
Author
Owner

@enchev commented on GitHub (Nov 1, 2023):

Hardcoding AllGroupsExpanded="false" in the markup will lead to collapsing of all groups on every state change.

@enchev commented on GitHub (Nov 1, 2023): Hardcoding AllGroupsExpanded="false" in the markup will lead to collapsing of all groups on every state change.
Author
Owner

@maria-g-codes commented on GitHub (Nov 1, 2023):

@enchev I guess I'm not understanding how to have the groups collapsed by default on page load then. This article says to set AllGroupsExpanded to false? (https://forum.radzen.com/t/datagrid-grouping-collapsed-by-default/12815/2)

Prior to updating to this version of Radzen I was able to have the groups collapsed on load and expand and click on rows without the groups collapsing while using the grid. I made no other code changes other than updating Radzen and now it no longer works.

@maria-g-codes commented on GitHub (Nov 1, 2023): @enchev I guess I'm not understanding how to have the groups collapsed by default on page load then. This article says to set AllGroupsExpanded to false? (https://forum.radzen.com/t/datagrid-grouping-collapsed-by-default/12815/2) Prior to updating to this version of Radzen I was able to have the groups collapsed on load and expand and click on rows without the groups collapsing while using the grid. I made no other code changes other than updating Radzen and now it no longer works.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#1028