|Visual Studio version
Tested only on IE9.
This project demonstrated the showing and hiding of a RadAjaxLoadingPanel during the download of an exported file. I've implemented the idea explained here
. The attached project is a sample website using the Northwind database to display records in a RadGrid. When you click any of the export buttons, the requestStart event of the ajax panel is triggered which causes a timestamp to get written to a HiddenField. A timer is also started in order to check for a cookie that is sent from the server once the export process is finished. On the server, the GridExporting event is handled at which point a cookie is written to the response stream with the timestamp previously sent from the client. Once the client confirms that the timestamp exists in the response's cookie, it clears the timer, hides the RadAjaxLoadingPanel
and clears the cookie.
Cookies must be enabled on the client in order for this method to work. The RadGrid.ExportSettings.OpenInNewWindow must be set to true for this method to work.
In this example, I use the RadAjaxLoadingPanel, though you should be able to use any other loading graphic or jQuery plugin to accomplish the same thing. While a timestamp is used for identifying the request on the client, it shouldn't be relied upon to get the time it takes to generate a report, as the client doesn't check for the cookie until AFTER the file has finished downloading.