radzenhq / radzen-blazor

Radzen Blazor is a set of 90+ free native Blazor UI components packed with DataGrid, Scheduler, Charts and robust theming including Material design and FluentUI.
https://www.radzen.com
MIT License
3.55k stars 792 forks source link

Datagrid Composite Columns sizing bug #1594

Closed T-Berkvens closed 3 months ago

T-Berkvens commented 3 months ago

When creating a RadzenDataGrid, using multiple composite columns, the latest headerrow messes up widths of columns. Specifically, if you have a columnheader with width 500, and 5 sub columns with width 100, and copy this total a few times, the subcolumns get width 500. If you have 3 maincolumns, each with 5 sub columns, the first 3 subcolumns of the first maincolumn will have the same width as the maincolumn (500). Giving the first maincolumn a width of 500 3 + 100 2 instead of 100 * 5

Steps to reproduce the behavior:

  1. Go to https://blazor.radzen.com/datagrid-composite-columns
  2. Copy all code to a test project, and fill in the employee class to have the needed properties (I just deleted the photo column)
  3. Copy the Title column with all subcolumns X times
  4. For every X, the last columnheaderrow will have columns with a width of the Title column (820 instead of 200/140 in Job title, Birth Date, Hire date)

Desktop (please complete the following information):

T-Berkvens commented 3 months ago

https://forum.radzen.com/t/composite-columns-issue/10023/7

I have found this discussion but not being able to set the width specifically is an issue in my case.

enchev commented 3 months ago

I'm afraid that I cannot add anything else to what I've already posted in this forum.