DataGrid column width being reset after paging

Hello @Team,

Here's the grid right after the page is loaded:

This is after dragging the first splitter and increasing the first column's width:

After doing any first paging action:

After doing any second paging action, the widths will reset:

This does not happen in the demo, unfortunately. That's probably because the column widths are unset.

Hi @kim,

The linked demo uses ColumnWidth so the widths are set. We will need to reproduce the problem in order to troubleshoot. What is the minimal grid declaration which shows this issue?

I made a test app to reproduce. The bug happens when you set the column's width to a value in the columns editor.
If you set them to a direct value such as 100px for example, when you resize any column they will look off when being dragged, will have some arbitrary width and jump around the grid.
If you set them to a percentage such as 50%, which was used in the images below, dragging will work as expected but again, paging will try and reset them every time.

The images below show all the things I did in the app after creating it.




UPDATE: I managed to record some gifs

Here's with 100px and 400px:

And this is 20% and 80%:

The same thing happens when sorting or filtering.

Another thing to mention is that after the ColumnWidth property was introduced in DataGrid, it's not clear which width should be used. Is it the one set in each column or this global width?

Hi @kim,

Thank you for the details. We reproduced the issue and will investigate further.

Hey @kim,

The fix is already in the master branch and it will be released with our next update before the end of this week.

Lightning speed as always, thank you!

1 Like