Gopal Saini
Gopal Saini

Reputation: 357

Set Extjs Panel's Height (Layout) After It's Child items taken their height

How can we recalculate the Extjs-4 Panel's Height After it's Child items like Grid (Which have auto height) takes their height.

Upvotes: 1

Views: 3827

Answers (1)

Deniz
Deniz

Reputation: 813

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();
        }
    }
}),

Upvotes: 1

Related Questions