I need to set a minimum width for the some of the columns in my MudBlazor MudDataGrid
.
I could not find an option in the MudDataGrid column component and even when I set a minimum width in the CSS
style property of the column component there was no change to the width.
How do I go about setting a minimum width for the MudDataGrid columns that need it?
<MudDataGrid T="Car" Items="@Cars" Sortable="true" Filterable="false" Outlined="true">
<Columns>
<Column T="Car" Field="Description" Sortable="false" Title="Description" Style="min-width: 1000px"/>
</Columns>
<PagerContent>
<MudDataGridPager T="Car" />
</PagerContent>
</MudDataGrid>
You have to set the CellStyle
parameter of the Column
.
<Column CellStyle="min-width: 1000px;" T="Car" Field="Description" Sortable="false" Title="Description" />