I want to Export the contents of Ultrawebgrid to excel, in a webapplication , without postback. I have Placed both the ultrawebgrid and button to export the content to excel in a update panel. I am getting below error when clicked on button.
Does anybody have any ideas? I really need to get this working.
Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.
TO INFRAGISTICS DEVELOPERS: I saw number of others have the same issue. Does ingragistics planned to release any hot fix on this or is this goint to be part of their next release.
Thanks guys!
After reading this thread I solved my issue with this as well.
My asp:button that calls the export is in the updatepanel with the grid and ultrawebgridexcelexporter - I just added it as a postback trigger to the updatepanel and it works fine..
<asp:Updatepanel...>
<ContentTemplate>
<asp:Button ID="myButtonName" ...>
<igtbl:UltrawebGrid declaration...>
<igtblexp:UltraWebGridExporter declaration..>
</ContentTemplate>
</asp:UpdatePanel>
Vince, Thanks for the response. I have solved this by placing my command button in one more update panel and placing the trigger. Hopefully others can advantage of below code.
<asp:UpdatePanel ID="UpdatePanel2" runat="server">
<ContentTemplate> <asp:Button ID="btnExportToExcel" runat="server" Text="Export to Excel" Visible="true" Width="130px" Height="22px"/></ContentTemplate><Triggers> <asp:PostBackTrigger ControlID="btnExportToExcel" /> </Triggers></asp:UpdatePanel>
I commented on this topic in the following thread (among others):http://forums.infragistics.com/forums/p/8863/51101.aspx#51101
Because WebGridExcelExporter takes over the response object, and because UpdatePanel expects a response to be a certain format, it is necessary for the page to trigger a normal postback to perform an export. The same applies when using our WebAsyncRefreshPanel (WARP), for the same reason - WARP will simply ignore the response that it doesn't understand, while UpdatePanel throws an error.
The same also applies when using WebGridDocumentExporter, using either UpdatePanel or WARP, for the same reason.