开发者

ASP.NET Grid AjaxPanel Download Issue

开发者 https://www.devze.com 2022-12-31 19:29 出处:网络
I have a telerik grid which is performing operations like searching,sorting,filtering etc. To make customers happy, we开发者_StackOverflow put this control in an ajax panel for seamless experience.

I have a telerik grid which is performing operations like searching,sorting,filtering etc. To make customers happy, we开发者_StackOverflow 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


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.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消