Skip to content

Commit

Permalink
DataGrid will group wrong column in case of Visible=false columns
Browse files Browse the repository at this point in the history
  • Loading branch information
enchev committed Sep 27, 2024
1 parent 108a209 commit 8a5bba6
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions Radzen.Blazor/RadzenDataGrid.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3104,13 +3104,7 @@ internal async Task EndColumnDropToGroup()
var functionName = $"Radzen['{getColumnUniqueId(indexOfColumnToReoder.Value)}end']";
await JSRuntime.InvokeVoidAsync("eval", $"{functionName} && {functionName}()");

RadzenDataGridColumn<TItem> column;

column = columns.Where(c => c.GetVisible()).ElementAtOrDefault(indexOfColumnToReoder.Value);

//may be its a child column
if (column == null)
column = allColumns.Where(c => c.GetVisible()).ElementAtOrDefault(indexOfColumnToReoder.Value);
var column = allColumns.ElementAtOrDefault(indexOfColumnToReoder.Value);

if (column != null && column.Groupable && !string.IsNullOrEmpty(column.GetGroupProperty()))
{
Expand Down

0 comments on commit 8a5bba6

Please sign in to comment.