I can't see that this is currently possible, so please enlighten me if you know the answer:
I have a grid in a GridPanel where I wan't the last column to always fill up the rest (the 'whitespace' to the right of the grid) if the total width of the columns is not as wide as the GridPanel itself.
How to do this... if it can be done?
I have a grid in a GridPanel where I wan't the last column to always fill up the rest (the 'whitespace' to the right of the grid) if the total width of the columns is not as wide as the GridPanel itself.
How to do this... if it can be done?

#2
![]() |
![]() It will involve some calculations, to do it efficiently it should be handled internally. I will look into it.
![]() |
#3
![]() | |
![]() Quote:
Thanks again for your job. ![]() |
#4
![]() |
![]() For the domino developers out there, this would also be nice since Domino has a setting for 'views' (that we are displaying in the grid) to 'extend last column to window width'. I personally, would prefer if there were a way to pick *any* column as the one to grow/shrink automatically. Or (and maybe you already have this), you could have a minWidth and maxWidth and the grid will auto resize columns based off of these as well. Maybe the grid could even have a setting for minHeight and maxHeight for rows.
![]() |
#5
![]() | |
![]() Quote:
![]() |
#6
![]() |
![]() I'd have to second that the "extend last column to window width" would be much better if it defaulted to the last column, but could be configurable.
![]() |
#7
![]() | |
![]() Quote:
![]() |
#8
![]() |
![]() Ok, I added it.
autoExpandColumn config option, that will need to be the id of a column in your column model. It doesn't default to the last column, you will need to specify a valid id. We just eliminated column order dependencies and I don't want to introduce a new one. Some limitations (aka features): It only grows, and doesn't shrink. Shrinking could be put in, but it will result in more calculation (not code wise, performance wise). I wouldn't recommend it, but I could add it. A column auto expand (or shrink) has the overhead of a double layout but is still 5-10x faster than an autoSizeColumns call. Once the user has resized any column, auto expand is turned off. If not, all kinds of undesirable behavior happens (e.g. user resizes any column smaller and it auto pops back to where it was ![]() ![]() |
#9
![]() |
![]() Thank you Jack... You are always the best.
![]() |
#10
![]() | |||
![]() Quote:
Quote:
Quote:
![]() |