Author Topic: I cannot seem to be able to hide the Loading message?  (Read 2236 times)

tcf

  • Pro Deluxe
  • Newbie
  • *
  • Posts: 13
    • View Profile
I cannot seem to be able to hide the Loading message?
« 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

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: I cannot seem to be able to hide the Loading message?
« Reply #1 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