var1en
11 Apr 2007, 4:01 AM
function initGrid() {
var grid = new Ext.grid.Grid(this.customerLayout.getEl().createChild({tag: 'div'}), {
ds: dataStore,
cm: colModel,
autoSizeColumns : true,
monitorWindowResize : true,
autoHeight : true,
loadMask: true,
selModel : rowSelector,
enableColLock : false
});
//grid.on('click', this.showEditPanel.createDelegate(this));
grid.on({
rowclick : this.createItem.createDelegate(this),
rowcontextmenu : function(grid, rowIndex, e){
alert('context menu');
e.stopEvent();
}
});
this.grid = grid;
this.grid.render();
/* init page toolbar */
}
this.initGrid();
this.customerLayout.beginUpdate();
this.gridPanel = this.customerLayout.add('center',new Ext.GridPanel(this.grid));
this.grid.getDataSource().load({params:{start:0, limit:25}});
this.customerLayout.endUpdate();
In this case "Loading" located on the top of grid. I think bug that location of loading massage calculate before calculate size of grid.
var grid = new Ext.grid.Grid(this.customerLayout.getEl().createChild({tag: 'div'}), {
ds: dataStore,
cm: colModel,
autoSizeColumns : true,
monitorWindowResize : true,
autoHeight : true,
loadMask: true,
selModel : rowSelector,
enableColLock : false
});
//grid.on('click', this.showEditPanel.createDelegate(this));
grid.on({
rowclick : this.createItem.createDelegate(this),
rowcontextmenu : function(grid, rowIndex, e){
alert('context menu');
e.stopEvent();
}
});
this.grid = grid;
this.grid.render();
/* init page toolbar */
}
this.initGrid();
this.customerLayout.beginUpdate();
this.gridPanel = this.customerLayout.add('center',new Ext.GridPanel(this.grid));
this.grid.getDataSource().load({params:{start:0, limit:25}});
this.customerLayout.endUpdate();
In this case "Loading" located on the top of grid. I think bug that location of loading massage calculate before calculate size of grid.