I have the following settings on my igGrid:
When I resize my browser window, the columns holding the data resize automatically to fit the width of the page, however the header columns don't. I end up with this:
Is this a bug that has been fixed in the upcoming service release or am I doing something wrong with my settings?
Hi,
In that case is it necessary to set a defaultColumnWidth? I mean you can let the columns without a width, and they will resize to accomodate the data contents. Does this work for you?
thanks,
Angel
Issues I have with Angel's proposed solution are:
a) I have a variable amount of columns as a user can select up to 40 columns for this grid, and
b) My grid has a percentage width (100%) which is variable
so it is very hard for me to work out the width for each column so that it divides evenly in the grid width.
Hello,If you have more questions about this issue do not hessitate to ask.
Hi again,
just to clarify, above i was referring to the case when no column has a specific width applied, and you are only setting "defaultColumnWidth" in px. If you have some columns with percentage width defined, and some columns don't have any width set, and at the same time you have defaultColumnWidth in px, and percentage width for the grid, this combination will work fine. It will just make the columns that don't have width be 100 px, and then only the other percentage columns will resize when the grid resizes. I suppose that's what you are probably trying to achieve?
Thank you, Angel
Having width 100% for the grid and a fixed pixel defaultColumnWidth for the columns is not applicable/supported together. If you have width 100 % defined, basically you shouldn't have any fixed column width set, as it will not have any effect and will lead to side effects as the one described. Default column width basically means a fixed, same width, applied on all columns - which doesn't change whether you resize the browser or not. You can define percentage width individually for any column, and it will play nicely with 100 % on the grid, while you're resizing the browser. So you can have 10%, 20%, etc. defined individually for any column (just as an example).
Let me know if this helps. Thanks,