PDA

View Full Version : Point the grid loadmask over one toolbar item, not over the grid



klodoma1
9 Feb 2013, 6:24 AM
Hi,

I want to point the loadmask of the gridpanel over an element in the toolbar, but haven't figured out how to do it.

This code is showing the loadmask where I need:


new Ext.LoadMask(grid.down('tbfill'), {}).show();



but I was not able to bind it to the grid view's loadmask:

grid.getView().setLoading(new Ext.LoadMask(grid.down('tbfill'), {}));

I've tried several options with setLoading, even replacing the view's loadMask directly, but it's not working as I would like to.

Any ideas?

mitchellsimoens
11 Feb 2013, 10:04 AM
Instead of using setLoading on the grid, use it on the component you want masked.

klodoma1
11 Feb 2013, 11:14 AM
For me it was not clear how the store is binded to the loadmask...

So here is the solution that works:


me.on('afterrender', function() {
var mask = new Ext.LoadMask(me.down('tbfill'), {});
mask.bindStore(me.getStore());
});


me - is the grid object
tbfill - is a spacer in the grid tab.