This is a migrated thread and some comments may be shown as answers.

Loading Panel does not work with GridAttachmentColumn in grid

1 Answer 34 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Tejas
Top achievements
Rank 1
Tejas asked on 25 Apr 2011, 04:45 PM
Hi,
I have a grid in my web page with GridAttachmentColumn which displays download file link. When user click on link to download the file from server. I writes byte stream in response so that It shows download dialogue in user's browser. It works fine without using loading panel, but with loading panel enabled when I try to download a file clicking the download link of GridAttachmentColumn, it shows strange behavior with some javascript message "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 '". How can I disable loading panel behavior when user try to download file only and still works for other grid operations like insert/edit/delete and paging operation.
Ohh yes, I know we can not write file to response while sending Ajax request or response.

Thanks

Tejas

1 Answer, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 25 Apr 2011, 05:06 PM
Hello Tejas,

Response.Write is not supported by RadAjax or the ASP.NET AJAX framework in general. To execute your custom alert, use either:
  • The Alert method of RadAjaxManager
    or
  • The RadAjaxManager's ResponseScripts collection/RegisterStartupScript method of the asp ScriptManager (see this topic for more info)

All the best,
Pavlina
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
Grid
Asked by
Tejas
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Share this question
or