PDA

View Full Version : Unsure how to follow API on Ext.loadMask()



Elijah
6 Aug 2010, 9:51 AM
I can't figure where the API wants me to put in the code.
Ext.LoadMask(mygrid, {msg:'loading...'};
Would someone show me where it goes? Where I am putting it just throws errors.


return {
xtype: 'grid',
id:argCnfg.id,
draggable: false,
stripeRows: true,
border:true,
// associate a datastore to this grid panel
ds: argCnfg.dataStore,
// Note: This could be constructed later on outside of here to make more dynamic
cm: new Ext.grid.ColumnModel([
// Specify the dataIndex which maps to a field specified in the Ext.Data.Reader
]),

viewConfig: {
forceFit:true
},

selModel: new Ext.grid.RowSelectionModel({
singleSelect: true,
listeners: {
onRefresh: function(){
console.info('inside of the selModel listener for the onRefresh');
},
rowselect: function(sm, rowIdx, r) {
console.info(self.modName + ': inside of the selModel listener for the rowselect');
} // rowselect
} // listeners
}), //selModel

listeners:{
// once the panel is displayed call to get the store
'show': function(grid){
this.doLayout();
// Call to load the data store only load the store if it is empty
if(this.getStore().getCount() == 0){
console.info(self.modName + ': DataStore show func the id is: ' + grid.id);
grid.getStore().load();
} // if
},
'rowdblclick': function(grid, rowIndex, e) {
console.info('Inside of the selModel listener for the rowdblclick');
console.info(grid.getStore().getAt(rowIndex));
} // rowselect
}, //listeners
}; // eoreturn

Condor
7 Aug 2010, 3:48 AM
GridPanel has a build-in loadmask, which you can enable by specifying loadMask:true or loadMask:{msg:'Loading...'}