How can we recalculate the Extjs-4 Panel's Height After it's Child items like Grid (Which have auto height) takes 开发者_C百科their height.
Use autoHeight
with Panel and GridPanel. Then catch the resize event of GridPanel to force Panel to layout :
var grid = new Ext.grid.GridPanel({
listeners: {
'resize': function () {
var panel = Ext.getCmp('panel');
panel.doLayout();
}
}
}),
精彩评论