PDA

View Full Version : problem setting height dynamicly of a grid when autoHeight is already set



rich71
5 Oct 2010, 6:47 AM
Hello,

Does anyone know how to toggle between autoheight is true and setting a height dynamicly of a grid.

Mygrid is on a normal page without a viewport.

If I do this, then I loose the scrollbar


mygrid.autoHeight=false;
mygrid.setHeight(200);if I leave autoHeight is true out of the initial setup of the grid, I have no way to determine the height it needs for the rows.

Does anyone has a solution for this?

Thanks in adv, Richard

Condor
6 Oct 2010, 2:18 AM
I would advise against this.

Leave your grid set to autoHeight:true and calculate the required height of the grid by getting the scroller height and adding the header and footer heights.