Skip to content

Commit

Permalink
Fix #3178 (#3189)
Browse files Browse the repository at this point in the history
Co-authored-by: Denis Voituron <[email protected]>
  • Loading branch information
vnbaaij and dvoituron authored Jan 16, 2025
1 parent 9556a35 commit 4c6ec97
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Core/Components/DataGrid/FluentDataGrid.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,8 @@ private void FinishCollectingColumns()
throw new Exception("You can use either the 'GridTemplateColumns' parameter on the grid or the 'Width' property at the column level, not both.");
}

if (string.IsNullOrWhiteSpace(_internalGridTemplateColumns))
// Always re-evaluate after collecting columns when using displaymode grid. A column might be added or hidden and the _internalGridTemplateColumns needs to reflect that.
if (DisplayMode == DataGridDisplayMode.Grid)
{
if (!AutoFit)
{
Expand All @@ -501,7 +502,6 @@ private void FinishCollectingColumns()
{
_internalGridTemplateColumns = string.Join(" ", _columns.Select(x => x.Width ?? "auto"));
}

}

if (ResizableColumns)
Expand Down

0 comments on commit 4c6ec97

Please sign in to comment.