ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: tcf on February 08, 2016, 11:03:20 pm

Title: I cannot seem to be able to hide the Loading message?
Post by: tcf on February 08, 2016, 11:03:20 pm
I've tried doing the following :

$( "#grid" ).pqGrid( "hideLoading" );

but every time I refresh the grid using this command below the Loading message appears:

$( "#grid" ).pqGrid( "refreshDataAndView" );

Any Suggestions?

Thanks
Title: Re: I cannot seem to be able to hide the Loading message?
Post by: paramvir on February 09, 2016, 09:08:28 am
It's because refreshDataAndView() initiates a new remote request and calls showLoading() which shows the message again.

dataModel.beforeSend callback can be used to hide it whenever it's shown by refreshDataAndView()

Code: [Select]
beforeSend: function(){
this.hideLoading();
},

http://paramquery.com/pro/api#option-dataModel-beforeSend