Instead, can white space just be added to the end?
1 Answer, 1 is accepted
0
Hetali
Telerik team
answered on 06 Sep 2022, 04:51 PM
| edited on 08 Sep 2022, 08:26 PM
Hi Marvin,
By default, when a column of the Kendo UI Grid is resized, other columns do not resize and white space is added to the end. Please take a look at this example from the Column Resizing article performing the mentioned feature.
To prevent other columns from resizing when you toggle the visibility of a column from the Kendo UI Grid, set the first column as locked as seen in this updated example.
More information on column widths can be found here.
Thanks for your response and the example you linked to. I see now that the behavior I was describing was when hiding and unhiding columns was involved.
In this example, you can see that when a column is hidden with the "toggle" buttons, the other columns resize to use up the space previously used by the hidden column.
You can also see that attempting to to set the other column back to their specified widths after hiding does not work. (I presume this is due to Angular's change detection mechanism not picking up on the change.
Any help is appreciated.
Marvin
Hetali
Telerik team
commented on 08 Sep 2022, 08:28 PM
Hi Marvin,
Thank you for the additional information.
To get the desired column width behavior, set the first column as locked. Please take a look at the answer above that I have updated.