PDA

View Full Version : How to show waiting message



JuanAlbertoMtz
31 Aug 2017, 10:26 AM
I have a Grid and I am using ajax to call a method to get the data I want to show in that Grid.
Sometimes it takes several seconds to retreive the information and to render it in the Grid.

I am using the next code:


var myMask = new Ext.LoadMask(Ext.getCmp("mainLayout"), { msg: "Retrieving data..." });
myMask.show();


setTimeout(function () {
BindReport(function () {
myMask.hide();
});
}, 500);

This is showing the message but I have to specify the time the message is displayed, sometimes the message hides before the information is loaded and it seems nothing is happening.

I would like to show a waiting message while the information is being loaded and rendered, what is the best way to accomplish this?

Regards.

vick_44
22 Sep 2017, 4:44 AM
You could just use below one, this will not disappear until the grid data is rendered.


grid.getView().getEl().mask('Loading...');