Gridpanel auto resize on window resize

Posted by imnotneo on Stack Overflow See other posts from Stack Overflow or by imnotneo
Published on 2010-03-25T07:45:46Z Indexed on 2010/03/25 7:53 UTC
Read the original article Hit count: 806

Filed under:

I'm using the array-grid extjs example to try and fit a gridpanel into a container window. The problem is on resizing the container window, the gridpanel doesn't automatically fit the new size. As I understand it that's how it's supposed to work.

Here's the link to the example: http://www.extjs.com/deploy/dev/examples/grid/array-grid.html

What I've done is changed the following..

// Added to gridpanel config
layout: 'fit',
viewConfig: {
    forceFit: true
}

// Window container
var gridWindow = new Ext.Window({
    items: [
        grid
    ]
});

// Instead of grid.render, use gridWindow.show();
gridWindow.show();

result

© Stack Overflow or respective owner

Related posts about extjs