ParamQuery grid support forum

General Category => Help for ParamQuery Grid (free version) => Topic started by: rbazua on February 02, 2018, 10:13:29 pm

Title: How to cancel a remote loading?
Post by: rbazua on February 02, 2018, 10:13:29 pm
I have a remote dataSource for my grid. I want to give my user a "Cancel" button which cancels the current loading of remote data, maybe if the loading is taking too long, or they want to change their searching parameters.
Is there a way I can cancel an ongoing remote loading?
Thanks
Title: Re: How to cancel a remote loading?
Post by: paramvir on February 12, 2018, 12:48:20 pm
jqXHR object returned by $.ajax method has an abort method to cancel the waiting/loading of remote data.

Reference to jqXHR can be obtained in https://paramquery.com/api#option-dataModel-beforeSend callback.
Title: Re: How to cancel a remote loading?
Post by: rbazua on February 20, 2018, 09:49:18 pm
Thanks, I was able to implement the functionality I wanted