Change ExtJS Grid Height in Javascript

Posted by williamtroup on Stack Overflow See other posts from Stack Overflow or by williamtroup
Published on 2010-06-07T08:38:12Z Indexed on 2010/06/07 8:42 UTC
Read the original article Hit count: 274

Filed under:
|
|
|

How can I point at the object of a ExtJS Grid and manually set the height (in pixels)?

For example, with this same:

var grid = new Ext.grid.GridPanel({
    store: store,
    columns: [
        {id:'company',header: 'Company', width: 160, sortable: true, dataIndex: 'company'},
        {header: 'Price', width: 75, sortable: true, renderer: 'usMoney', dataIndex: 'price'},
        {header: 'Change', width: 75, sortable: true, renderer: change, dataIndex: 'change'},
        {header: '% Change', width: 75, sortable: true, renderer: pctChange, dataIndex: 'pctChange'},
        {header: 'Last Updated', width: 85, sortable: true, renderer: Ext.util.Format.dateRenderer('m/d/Y'), dataIndex: 'lastChange'}
    ],
    stripeRows: true,
    autoExpandColumn: 'company',
    height: 350,
    width: 600,
    title: 'Array Grid',
    // config options for stateful behavior
    stateful: true,
    stateId: 'grid'        
});

I would i be able to point at the "grid" object and then set the size of the grid?

Any help would be fantastic!

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about extjs