PDA

View Full Version : Grid Height



Tony Mariella
3 Aug 2007, 3:57 AM
Question: I have a page that has multiple grids on it. I am using the XMLReader to popupate each grid. Sometimes when then grid only has a single row, it doesn't render correctly. It looks as if it gets squeezed. The Column Headers look fine, but the row data has a tiny scrollbar on the right hand side. I have tried setting the height to 100%, but that creates a huge grid. I also tried autoHeight: true, but that had no effect.

Any ideas how to fix this ?

sj137
3 Aug 2007, 6:29 AM
if you can dynamically calculate the height you want depending on for example the number of records etc... then you can use this:




var height = ....?
Ext.get('mygrid').applyStyles({
overflow:'hidden',
height: height+'px'
});


...to set the height of your grid

(i think... try it out... ;)

Tony Mariella
13 Aug 2007, 5:25 AM
Thanks, I was able to just set the minimun height.