Image attached and I created a JSFiddle here:
Image here if it doesn't attach: http://i.imgur.com/7ZXYsmu.png
9 Answers, 1 is accepted
The observed issue is caused by an incorrect column width configuration (i.e. a missing column width). Please refer to the documentation:
You can also notice that there is one header cell missing, which is again caused by the missing column width. The proposed workaround does not resolve this problem.
Errors have been fixed and the issue still exists. The workaround is working.
Without workaround: http://jsfiddle.net/dmathisen/gFwtm/2/
With workaround: http://jsfiddle.net/dmathisen/gFwtm/3/
The sum of all column widths is less than the Grid width. Such a configuration is generally not supported (see below) and moreover, it doesn't make sense in the context of frozen columns, because frozen columns are useful when there is horizontal scrolling, i.e. when the sum of all column widths exceeds the Grid width.
Right. But when the width is less than the container and there is no scrolling, why create that ugly whitespace when you can just fill the entire witdth, as seen in my second example? It looks much nicer to fill the entire table. Maybe that's just me.
Anyway, thanks for the input and explanation.
Removing the whitespace would require one of the following:
1) changing the Grid configuration on the fly and "making up" new column widths, which are different from the set ones.
2) expanding the table with the existing column widths, which will lead to undesired jumping and flickering during column resizing.
We would like to refrain from doing any of the above.
I'm seeing the same thing. Without my locked column, the grid behaves just as I would want with horizontal scrolling when the window becomes too narrow and columns automatically expanding when the window is wider than the total of specified column widths.
Here is the grid definition (sorry for the VB)
When frozen columns are used, the Grid renders a few additional <table>s and <div>s, and applies the sum of the configured non-frozen columns' widths as a width to the <div>, which wraps them. As a result, you are seeing different behavior, compared to the case when there are no frozen columns.
Your options to avoid seeing white-space inside the Grid are:
- use a small-enough width for the Grid
- use larger column widths
The Grid width and/or appropriate column widths can even be set, according to the user's screen resolution.