PDA

View Full Version : Grid with many columns



sofway
18 Feb 2011, 8:41 AM
Hi,
i have a grid panel inside a border layout center panel.
The grid has many columns and some columns doesn't show up. I have to reduce some columns with to see the others.

is there any way to put a horizontal scrool bar to the grid??

i have used
viewConfig: {
forceFit: true
},

and does not anything.

Thanks

Condor
18 Feb 2011, 9:22 AM
No, you don't want forceFit:true.

A grid would normally show a scrollbar if it has a width and a height, which it would if it was the center region of a border layout.

Did you overnest your layout or did you configure the grid with autoHeight:true?

(post code)

sofway
18 Feb 2011, 10:23 AM
thanks animal. But the border layout fit the entire window, so i can not predict the width of the grid.

sschmitt
18 Feb 2011, 2:17 PM
sofway,

Did you try autoScroll = true?

Condor is probably right about the nesting... sometimes scrollbars don't happen when a widget is confined.

softm
18 Feb 2011, 10:53 PM
thanks animal. But the border layout fit the entire window, so i can not predict the width of the grid.


so good isea - is use onresize even of window & set up this width.

Condor
19 Feb 2011, 8:30 AM
You can't make a grid autoScroll:true (it will disable it again). You don't want the entire grid to scroll anyway, you only want the body to scroll.

This is probably a layout misconfiguration. Can you post your layout code?