I have a kendo grid and I need to set one of the columns to a fixed width that is always exactly 120px. My issue is that if the screen is wider than the total set width of all of the columns it starts expanding the columns. This is good for everything except my one column that needs to always be the same. I also tried leaving the width off of one of the columns. The problem with that is that when the screen is narrow (like a phone or tablet) the column without a set width disappears. Another trick I tried is using the template to wrap the column in a span tag with a fixed width, however that just overflows the cell. How do I solve for this?
Hi Lee,
The requirements for the Grid to work with frozen column(s) include:
- Set explicit pixel widths to all columns to allow the Grid to adjust the layout of the frozen and non-frozen table parts.
- Make sure that the total width of all locked columns is equal to or less than the width of the Grid minus three times the width of the scrollbar.
If one or more columns are left without width the Frozen functionality will not work and the scrollbar for the non-frozen columns will not appear.
I think what is best is to set the desired 120px width for that one column and set a big enough width for all other columns so they do not expand on a bigger screen.
Hope this helps.
Regards,
Nikolay
Hi Lee,
I am afraid this is a limitation of the frozen columns and there is not much we can do to achieve the desired.
You can get rid of the frozen columns if that is an option and then you will be able to have a fixed width for just one column and adjustable width for the rest.
Regards,
Nikolay
Hi Lee,
Unfortunately, this lands into the limitations of the frozen columns functionality of the Grid and there is no workaround for it.
Regards,
Nikolay