tags:

views:

139

answers:

2

I'm working on a project where I have a single GridPanel on a page. The panel can display any number of rows and I have the autoHeight property set, which causes the GridPanel to expand to fit the number of rows. I now want a horizontal scrollbar because on some resolutions there is too much data to be displayed (and I cannot reduce the number of columns).

If I set the autoHeight I have no horizontal scrollbar, if I do not set it and set a fixed height I have a horizontal scrollbar but the GridPanel obviously does not fit the number of rows....

Is there anything I can do to fix this? I can't seem to find a property that would achieve the result I need.

A: 

This seems like an issue with your layout settings as opposed to the object properties.

Try setting the layout property of the parent container to 'fit'- can you also provide a code excerpt?

Ergo Summary
Like I said, I only have the gridpanel on the page and no layout container. I'm new to all this ExtJS stuff so I might have missed something, do I need to use a container around the gridpanel for it to work right?
JDT
A: 

As Ergo said, this is more likely a layout problem - the GridPanel is probably higher than the panel containing it, high enough not to need a scrollbar but not fully visible, obviously. Put the GridPanel into a container with a proper layout, i.e. border layout, fit layout or card layout. Getting layout managers right is generally one of the hardest part of ExtJS-Fu.

ammoQ