This is a migrated thread and some comments may be shown as answers.

[Solved] Cancelling grid data binding ajax request

1 Answer 89 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Stéphan Parrot
Top achievements
Rank 1
Stéphan Parrot asked on 06 Mar 2012, 05:29 PM
Hi folks,
      I have a grid which has a custom toolbar template with a list of user types. The first one is "All Users" which gets used to load users in the grid. The load of all users is quite long, which is fine but, I'd like to cancel the grid binding ajax request if I decide to change the selected value on that user type list because right now, if I change it to a type of user which only has 4 users, the grid shows instantly 4 users in it but the previous ajax request is still loading and when it's finished, the grids is then bound to these users which, from a user standpoint, will be innacceptable and very confusing... Is there a way to cancel the previous request?

Thanks!

1 Answer, 1 is accepted

Sort by
0
Stéphan Parrot
Top achievements
Rank 1
answered on 06 Mar 2012, 06:00 PM
Nevermind, I've found a solution that works like a charm!

Check it out following this link: http://stackoverflow.com/questions/1802936/stop-all-active-ajax-requests-in-jquery 
I'm using the 3rd post which is from mkmurray 

Cheers!
Tags
Grid
Asked by
Stéphan Parrot
Top achievements
Rank 1
Answers by
Stéphan Parrot
Top achievements
Rank 1
Share this question
or