chrishallowell
21 Aug 2009, 9:13 AM
How does this work? What object array is thecolumns? Is it a ColumnModel or just a column? I would have thought the commented out code was needed...
var thecolumns =[];
thecolumns.push({header :"Site", dataIndex :'Site', width :100});
thecolumns.push({header :"RecNum", dataIndex :'NumRecs', width :100});
//var colModel = new Ext.grid.ColumnModel(thecolumns);
var myGrid =new Ext.grid.GridPanel({
store : store,
columns : thecolumns,
fitcontainer : true,
height:200,
width : 280,
renderTo : 'example-grid4'
});
store.load();
myGrid.store.on('load',myGrid.autoSizeColumns,myGrid);
});
var thecolumns =[];
thecolumns.push({header :"Site", dataIndex :'Site', width :100});
thecolumns.push({header :"RecNum", dataIndex :'NumRecs', width :100});
//var colModel = new Ext.grid.ColumnModel(thecolumns);
var myGrid =new Ext.grid.GridPanel({
store : store,
columns : thecolumns,
fitcontainer : true,
height:200,
width : 280,
renderTo : 'example-grid4'
});
store.load();
myGrid.store.on('load',myGrid.autoSizeColumns,myGrid);
});