Skip to content

Commit

Permalink
fix datagrid header column width. closes #5804
Browse files Browse the repository at this point in the history
  • Loading branch information
tesar-tech committed Oct 31, 2024
1 parent 03e8efa commit 8d09099
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions Source/Extensions/Blazorise.DataGrid/DataGrid.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2866,6 +2866,7 @@ internal IEnumerable<DataGridColumn<TItem>> DisplayableColumns
for ( int i = 0; i < orderedDisplayColumns.Count; i++ )
{
var displayColumn = orderedDisplayColumns[i];
displayColumn.SetWidthToNull();
var colSpan = 1;

if ( !string.IsNullOrWhiteSpace( displayColumn.HeaderGroupCaption ) && orderedDisplayColumns.Count > i + 1 )
Expand Down
2 changes: 2 additions & 0 deletions Source/Extensions/Blazorise.DataGrid/DataGridColumn.cs
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,8 @@ internal DataGridColumnFilterMethod GetDataGridFilterMethodAsColumn()
: ParentDataGrid.FilterMethod == DataGridFilterMethod.NotEquals ? DataGridColumnFilterMethod.NotEquals
: DataGridColumnFilterMethod.Contains;
}

internal void SetWidthToNull()=> Width = null;//to supress BL0005

#endregion

Expand Down

0 comments on commit 8d09099

Please sign in to comment.