Hi,
I have a WARP object on my webpage that displays an Excel file based on the selected values in a couple of dropdowns, which are outside of the WARP. When the user changes the value in one of the dropdowns, I would like to be able to check if the WARP is still refreshing, and if it is, to stop the refresh.
How would I do this?
Hi Rumen,
Thanks for the solution. It works pretty well. I might need to do some tweaking, but it is doing what I want it to do, so thanks again.
Thanks for the follow-up. I see where the problem is now, unfortunately WARP does not expose a client-side function for that, we need to get the instance of the XmlHttpRequest and deal with that directly, so it is a bit tricky.
The code to achieve that can be found in this forum thread:(the cancelAllRequest method suggested by Tony Lombardo)
http://forums.infragistics.com/forums/p/1205/11519.aspx#11519
Please note, that in earlier version of our forum [i] was tranformed to emoticon, so you will need to replace the two emoticons with that :)
Hope this helps.
I think I didn't explain my requirement very well the first time.
I am looking for a way of cancelling the first refresh, so the subsequent refresh can run without waiting for the previous request to finish.
For example, the user selects the Period and the Excel page they wish to view. When the combobox for the Excel Page selector is changed, I trigger a refresh() on the WARP and it starts it's refresh. If the user changes the Excel Page selector to a new page, I want the previous refresh (the one that is currently running) to stop and the subsequent one to start refreshing.
I hope this makes a bit more sense.
Oh, I just forgot to add that you can cancel the resfresh in the RefreshRequest event - in the CSOM link I sent in the previous post, there is sample code how you can do that - basically, when the flag is true in RefreshRequest, you can cancel the subsequent request.
Hello,
I think this could be possible through using the CSOM (Client Side Object Model) of WARP. It is documented here:
http://help.infragistics.com/Help/NetAdvantage/NET/2008.2/CLR2.0/html/WebAsyncRefreshPanel_Client_Side_Events.html
The idea is to hook both RefreshRequest and RefreshComplete events and set a global javascript variable bool flag in RefreshRequest to true, and then set it back to false in RefreshComplete. This way, when the flag is true you will now that refresh is not complete yet.