I want show a wait icon when Export grid data to excel. My code is:
<asp:UpdatePanel ID="UpdatePanel1" runat="server" > <ContentTemplate> <span class="anniu">
<asp:Button ID="Button2" runat="server" Text="Export" OnClick="btnExcel_Click" /> </span> </ContentTemplate> <Triggers>
<asp:AsyncPostBackTrigger ControlID="Button2" EventName="Click" /> </Triggers> </asp:UpdatePanel>
<asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel1"> <ProgressTemplate> <img src="../../../images/ajax-loader.gif" style="width: 16px; height: 16px" /> </ProgressTemplate> </asp:UpdateProgress>
I get a exception when I click button to export grid data.
If I change "asp:AsyncPostBackTrigge" to "asp:PostBackTrigge" ,It is ok but the image do not show.
How can I show the image when export ?
Hello foxbabby,
Thank you for posting in the community.
Note that in order to export WebDataGrid using WebExcelExporter a full postback is required and thus an AJAX wait indicator may not be displayed.
A custom approach for exporting WebDataGrid asynchronously may however be possible and is presented at:
http://ko.infragistics.com/community/forums/t/55904.aspx
Please do not hesitate to contact me if you have any questions.