When all columns have set widths on a grid the first time it
loads if the combined width is less than the grid has available the columns
will be resized to fill the space. When a column is shown or hidden the columns
are resized to use their widths that are set from the beginning. I have come up
with a solution to the problem but I was curious of why this happens. When
showing/hiding a column a static width gets set to the table elements of the
combined width of the columns that are shown.
Why does the width get set if it doesn’t happen the first
time the grid loads?
My fix for this is to remove the table widths and allow it
to determine how large it needs to grow inside of its container.
I find that the results of removing the width on the table
has a better feel to the grid then adding it. Here is an example of this
behavior ( http://dojo.telerik.com/UKiF
) uncomment the $('#grid').find('[role="grid"]').css('width', ''); to
see my fix.
loads if the combined width is less than the grid has available the columns
will be resized to fill the space. When a column is shown or hidden the columns
are resized to use their widths that are set from the beginning. I have come up
with a solution to the problem but I was curious of why this happens. When
showing/hiding a column a static width gets set to the table elements of the
combined width of the columns that are shown.
Why does the width get set if it doesn’t happen the first
time the grid loads?
My fix for this is to remove the table widths and allow it
to determine how large it needs to grow inside of its container.
I find that the results of removing the width on the table
has a better feel to the grid then adding it. Here is an example of this
behavior ( http://dojo.telerik.com/UKiF
) uncomment the $('#grid').find('[role="grid"]').css('width', ''); to
see my fix.
