PDA

View Full Version : Busy Indicator / Masking view during updates



nrevelle
27 Nov 2007, 12:24 PM
I have a large Grouping view (1000+ rows). If the user changes the grouping or resorts, it takes a few seconds to process. Is there some magic setting (I've searched docs and forums) to mask the view or add a busy indicator (cursor?) while the changes are processing?

DigitalSkyline
27 Nov 2007, 12:41 PM
you could do this:
Ext.MessageBox.wait('updating...');

then:
Ext.MessageBox.hide();

Or just look at Element.mask(); //and roll your own
http://extjs.com/deploy/dev/docs/?class=Ext.Element

nrevelle
27 Nov 2007, 1:29 PM
Right, but I'm not seeing which events I would need to listen to.

hendricd
27 Nov 2007, 1:45 PM
If you have loadMask defined for your grid, you can turn it on at will:



grid.loadMask.msg='Sorting...';
grid.loadMask.show();
grid.getStore().sort('name','ASC');
Then it should turn itself off after grid is reloaded.

But, your right. Picking the right time to show it, might be tricky depending on how you are trapping such events.

nrevelle
27 Nov 2007, 1:52 PM
Sorry I'm not being clear in my question. I need to trigger the mask based on the user clicking to resort the view or clicking to change the view grouping. I was hoping there was some before/after event triggered by the panel refreshing I could listen for to show/hide the mask.

Thanks for the quick responses...

nrevelle
27 Nov 2007, 1:56 PM
Then it should turn itself off after grid is reloaded.

I tried this for Expand/Collapse All. It doesn't turn off.

Is there some debug method to view all events that are firing?

hendricd
27 Nov 2007, 2:01 PM
Nope, all you've got to work with there (in a GridView and descendants) are beforerefresh and refresh (unpublished in Docs).