Hello,
We use the 2016.1 version of the igGrid and our query which refresh data in the grid take a long time to execute (but that's not the problem).
We would like, when a new filter is entered by the user, to abort (or skip results) the current ajax request (and a new ajax request would be sent with the new filter...).
I tried the following code this._dataSource._ajaxRequest.abort(); and it seems to work, but the _ajaxRequest attribute is private so i'm cheating...
Please, is there a good way to do it ? Thanks a lot.
Hello Pepe,
I'm afraid that we don't have exposed a public API to access the igDataSource Ajax request, so that's the only available option to access it at the moment.
Best regards,Martin PavlovInfragistics, Inc.
Thanks for your answer Martin,
A last question : Could we expect in a next version a public access or an option in the igDataSource that would manage this operation ?
I think it could be a useful feature.
Best Regards,
Pepe Ronny
The igDataSource is part of the Ignite UI Open Source package which can be found on GitHub: https://github.com/IgniteUI/ignite-ui. You can log your request as an issue there.
Hi,
I am implementing the same abort operation. Could you please tell me what needs to be done in the RequestError event to avoid the _renderData error.
Thanks,
Sushma
Let us know what the issue number is when you log it.
For those who would have the same need :
- I had to define the onRequestError event because by default the abort operation triggers an error in the _renderData ig function and the new ajax request with the new filter is canceled.
- When a new filter is entered and the first load of the grid is not finished yet, the _loadingIndicator is undefined in the ig filter function and trigger an error. Unfortunately I did not find any solution about that, I had to modify the ig source code to make it works. I will open an issue for this.