PDA

View Full Version : SOS SOS why gridpanel's height not works



b_lee
14 Mar 2011, 12:59 AM
code blow work in version 2.0.2


<div id='test3' style='height:100%' />
var test3 = new Ext.grid.GridPanel({
store: test3_ds,
cm: test3_cm,
sm: test3_sm,
el: 'test3',
layout: 'fit',
multiSelectOnClick: false,
autoExpandColumn: "id",
bodyStyle: "height:100%"
});

test3.render();


the parent of div['test3'] is 300px, then in version 2.0.2, the grid's height is 300px.
my team want use 3.3.1 now, but this code doesn't working. the grid's height is not 300px.

after check the source of extjs I know that
in the Ext.Panel.afterRender method,
3.3.1 deleted code blow:


if(this.fromMarkup && this.height === undefined && !this.autoHeight){
this.height = this.el.getHeight();
}


then, I want to know why you deleted that code, which, makes the problem.

we don't want to rewrite our code because it's will spent us too many time.

thank you.

b_lee
14 Mar 2011, 1:03 AM
version 2.0.2
25121

version3.3.1
25122

mitchellsimoens
14 Mar 2011, 5:13 AM
In the code you provided, you don't specify the height.

b_lee
14 Mar 2011, 5:17 PM
Yes, I know. but it works in version 2.0.2.
the extjs freamwork remove codes blow


if(this.fromMarkup && this.height === undefined && !this.autoHeight){
this.height = this.el.getHeight();
}

from the "Ext.Panel.afterRender" method.
I just want to know why these codes are removed.

b_lee
14 Mar 2011, 9:59 PM
Anyone can help me?
Or give me an SVN/CVS address then I can check out the source code of ExtJs and then find out why that codes are remoed from the SVN/CVS notes.

b_lee
15 Mar 2011, 5:29 PM
waiting ...

jratcliff
15 Mar 2011, 6:43 PM
If you like the way Ext 2x did the afterRender, then why not go ahead and create your own override that does the same thing?