PDA

View Full Version : Grid Width



lorenzo
21 Feb 2007, 12:55 AM
Ciao everybody,

I have a problem with the grid Width. How can I tell to the grid to get the size of the GridPanel in which it is?

Something like the old "autoWidth: true"

Grazie
Lorenzo

Belgabor
21 Feb 2007, 7:18 AM
I guess you have a similar problem to mine (posted here: http://www.yui-ext.com/forum/viewtopic.php?t=2843).
Unfortunately no one answered :/

jack.slocum
21 Feb 2007, 8:59 AM
I don't understand. Can you explain a little further? Is GridPanel broken for you? Thanks.

lorenzo
21 Feb 2007, 9:23 AM
Hi Jack,

I have a grid in a GridPanel in a center region of a border layout. Everything works fine except the fact that the body of the grid does not complete the with of the panel.

http://www.dinoweb.net/immagine.jpg

As you can see in the screenshot, I have the right part of the row left white... I would like to have the row till the end of the panel.

How can I do that?

Many thanks and sorry for my poor English.

jack.slocum
21 Feb 2007, 9:38 AM
Ah, the grid is in fact expanding to cover the whole panel but the rows now end at the last column. This is how the grid originally worked and there was a hack in .33 to get them to go all the way across no matter what. That hack doesn't work with the new version.

lorenzo
21 Feb 2007, 9:44 AM
Ah, the grid is in fact expanding to cover the whole panel but the rows now end at the last column. This is how the grid originally worked and there was a hack in .33 to get them to go all the way across no matter what. That hack doesn't work with the new version.

So, what do you suggest? Is there something I can do other than add another empty column till the end of my panel?

Thanks

jack.slocum
21 Feb 2007, 9:49 AM
It looks fine to me. If it's really a big problem, I can try to hack something up.

lorenzo
21 Feb 2007, 9:59 AM
No, no... don't do this just for me. It's not a big problem...

It was just easy.
I didn't have to worry about the dimension of the panel in which the grid was.

Another benefit was that resizing the window, I didn't have the horizontal scroll bar till the end of the last column.

But if I'm the only one having this problem... it's OK, I will add an empty column.

Thanks for your help.

jack.slocum
21 Feb 2007, 10:34 AM
You shouldn't be getting any extra scrollbars. Do you have a URL I can look at? I can take a look for you and see what we can do.

galdaka
22 Feb 2007, 10:42 AM
use grid.getView().fitColumnsToContainer(); works fine for me.

Belgabor
22 Feb 2007, 11:39 AM
use grid.getView().fitColumnsToContainer(); works fine for me.
Rev 9 doesn't seem to have such a function.

lorenzo
22 Feb 2007, 2:46 PM
use grid.getView().fitColumnsToContainer(); works fine for me.
Rev 9 doesn't seem to have such a function.

Yes, it doesn't exists anymore...

Thanks for your help