Hello Team,
I faced an issue with RadzenDataGrid and RadzenDataGridColumn when I tried to achieve certain behaviours in my table. I have 5 columns, and only one column has a fixed width. The rest is auto. But I would like to set a min-width for the first column with the MinWidth property.
Simplified version of my table:
<RadzenDataGrid>
<Columns>
<RadzenDataGridColumn MinWidth="250px"></RadzenDataGridColumn>
<RadzenDataGridColumn></RadzenDataGridColumn>
<RadzenDataGridColumn></RadzenDataGridColumn>
<RadzenDataGridColumn Width="200px"></RadzenDataGridColumn>
<RadzenDataGridColumn></RadzenDataGridColumn>
</Columns>
</RadzenDataGrid>
In this case, the first column does not consider the min-width value. If I shrink the browser window, the first column can be narrower than 250px. I can see the min-width value added to the <col>
group.
If I set a fixed width for all the columns, then it is working as expected.
<RadzenDataGrid>
<Columns>
<RadzenDataGridColumn MinWidth="250px"></RadzenDataGridColumn>
<RadzenDataGridColumn Width="50px"></RadzenDataGridColumn>
<RadzenDataGridColumn Width="50px"></RadzenDataGridColumn>
<RadzenDataGridColumn Width="200px"></RadzenDataGridColumn>
<RadzenDataGridColumn Width="50px"></RadzenDataGridColumn>
</Columns>
</RadzenDataGrid>
Also, if the columns are resizable by the user, but I don't need this functionality in my table.
I tried to reproduce my use case in one of the table demo pages, and I can see the same result. If the column widths are not fixed, then the min-width value is not considered.
Can someone enlighten me why the first use case cannot work, or is it possible to achieve that somehow?
Thank You for any response!