PDA

View Full Version : Grid Load Mask not showing



francescoNemesi
6 Sep 2007, 8:10 AM
Hi All,

my code is below, I have a grid in a dialog, loadMask : true is set for the grid, but the loading mask is never displayed... I'm sure it must something really simple, but I just can't get it. Can anyone help, please?

Kind Regards and thanks,
Francesco



var indDialog;

function calcIndicatori(){

ctxMenu.hide();

var portfolioId = ctree.getSelectionModel().getSelectedNode().id;


var indicatorsStore = new Ext.data.Store({
proxy: new Ext.data.HttpProxy({url: baseDomain+"/IndicatorsEngine"}),
baseParams: {cod_portafoglio : portfolioId
},
reader: new Ext.data.XmlReader({record : "row",
id : "id"},
["indicator",
"indicatorvalue",
"date"])
});
indicatorsStore.load();

var indicatorsColModel = new Ext.grid.ColumnModel([
{header : "Indicatore",
width : 250,
resizable : true,
sortable : true,
dataIndex : "indicator"},
{header : "Valore",
width : 100,
resizable : false,
sortable : true,
dataIndex : "indicatorvalue"},
{header : "Data",
width : 100,
resizable : false,
sortable : true,
dataIndex : "date"}
]);

var loadGrid = new Ext.grid.Grid('indicators-grid',{
ds : indicatorsStore,
cm : indicatorsColModel,
autoHeight : true,
loadMask : true
});

loadGrid.render();


if(!indDialog){ // lazy initialize the dialog and only create it once
indDialog = new Ext.BasicDialog("indicators-dlg", {
autoTabs:false,
width:640,
height:480,
shadow:true,
minWidth:640,
minHeight:480,
proxyDrag: true
});
indDialog.addKeyListener(27, indDialog.hide, indDialog);
indDialog.addButton('Chiudi', indDialog.hide, indDialog);
}

indDialog.show();

}

fay
6 Sep 2007, 8:17 AM
Try the following instead (in your grid) - works for me:


loadMask: {msg: 'Loading...'}