PDA

View Full Version : How to force LoadMask on GridPanel



daiei27
5 Aug 2010, 5:08 PM
Is there a way to force a loadMask to appear on a GridPanel without changing the store?

In firebug, I tried turning on the GridPanel's mask-related properties, as well as creating a Ext.LoadMask and passing the grid.

>>> this.grid
Object { initialConfig=Object, more...}
>>> this.grid.loadMask = true
true
>>> this.grid.maskDisabled = false
false
>>> var mask = new Ext.LoadMask(this.grid);
>>> mask.show();
>>> Ext.getBody()
Object { dom=, more...}
>>> var myMask = new Ext.LoadMask(Ext.getBody(), {msg:"Please wait..."});
undefined

I tried other random stuff that seemed like bigger long shots...

Anyone know a valid way to force the load mask to appear over the grid?

darthwes
5 Aug 2010, 5:32 PM
tbar: [{
text: 'LoadMask',
handler: function () {
var grid = (this.ownerCt.ownerCt);

var myMask = new Ext.LoadMask(grid.id, {msg:"Please wait..."});
myMask.show();
}
}],


Is that what you're after?

aj3423
5 Aug 2010, 7:09 PM
try
grid.getEl().mask('maskMessage', 'maskCls');

and

grid.getEl().unmask();

daiei27
6 Aug 2010, 6:02 AM
Both suggestions worked! Thank you!