I am trying to toggle the height off a grid 开发者_JS百科when the initial setup has autoheight is true. I want to be able to toggle the height when the grid becomes bigger then the browser view.
The grid is on a normal page without an ext viewport.
If I try setting a height like this, then I loose the scrollbar. I can see in firebug that the overflow is set to visible instead off auto. How can I change that?
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 possibly have a solution/workaround for this problem?
Thanks in adv, Richard
EDIT
I think this will work
var scroller = Ext.select("#grid-rekovz div.x-grid3-scroller");
scroller.setStyle('overflow-y','auto');
If you use autoHeight:true; then you delegate height calculating problems to browser, so you lose control of it. If you use autoHeight:false; then you can change height as you wish, but browser will not added scrollbar to content if it became larger then assigned area.
P. S. And yes, I'm necroposter =).
精彩评论