I’ve got a jqgrid (version 3.5.3) on my site which gets its results from an ajax call to a web service. Often the query is complicated and it takes a few seconds to load the result. While it is loading the user sees a box [Loading…].
In case the users realise they’re searching for the wrong thing, the client has asked to add a cancel button to the grid, which would:
- make the grid forget about the data it’s just requested
- retain the results already loaded from the previous search
There doesn’t seem to be anything built in for this, so I’m probably looking for a bit of a hack to achieve this.
Any ideas?
Here’s our solution, which is very similar to Oleg’s, the main difference is that we keep track of a list of XHRs to make sure we clean all requests up
…