views:

110

answers:

2

Hi,

I have a telerik grid which is performing operations like searching,sorting,filtering etc. To make customers happy, we put this control in an ajax panel for seamless experience.

Now, we added a new functionality to the grid where the customer can download the entire row information as a csv file. As the response is a file, ajax panel is trying to parse the output and throwing the following exception:

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. Details: Error parsing near 'ࡱ'.

Could you please help me in having both functionalities( Ajax and Download) in place without any error??

Thanks, Mahesh

A: 

You should use the RadAJAXManager and RadAJAXPanel instead of the ASP Scriptmanager & Ajax Panel. They work a lot better with Telerik controls.

Ed B
I used those. But the problem is I beleive when the file response is parsed as ajax response by the radajaxpanel.
Mahesh
A: 

It looks like we had problems exporting data from within a RadAJAXPanel also. What we did at our place was store the data from the grid and any filters, sorting & grouping in session objects.

Then, so the user can stay on the same page, we popped up a window thru JavaScript to direct the user to a generic handler(ashx file) that served the XLS, CVS, PDF or whatever format we specified in the querystring.

Then the session objects were cleaned.

Ed B