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

DetailTable: Sys.WebForms.PageRequestManagerParserErrorException

0 Answers 11 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Darius
Top achievements
Rank 1
Darius asked on 31 Mar 2018, 09:57 PM

Hello,

I have GridAttachmentColumn in a DetailTable of a RadGrid that is Ajaxified. I get following error when clicking 'Download':

"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."

This error does not happen if the GridAttachmentColumn is inside the main table. But unfortunately I can't have it in the main table, it has to be in DetailTable.

  <telerik:RadGrid  ID="xx"  AutoGenerateColumns="false" AlternatingItemStyle-HorizontalAlign="Left"
                                        HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Left" ShowHeadersWhenNoRecords="true"
                                        EnableNoRecordsTemplate="true" runat="server" AllowFilteringByColumn="false" AllowPaging="false"
                                        EnableViewState="true" AllowSorting="True" GridLines="None" Skin="WebBlue" ShowFooter="True" ShowStatusBar="True"
      OnDetailTableDataBind="xx"                              
      >
                                        <GroupingSettings CaseSensitive="false" />
                                        <AlternatingItemStyle BackColor="gainsboro" />
      <ClientSettings>
                                <ClientEvents OnCommand="gridCommand"></ClientEvents>
                            </ClientSettings>
                                        <MasterTableView DataKeyNames="xx" PageSize="5">
 
                                                <DetailTables>
                                                    <telerik:GridTableView
                                                        EnableHierarchyExpandAll="true"
                                                        >
                                                        <HeaderStyle CssClass="MostInnerHeaderStyle" />
                <ItemStyle CssClass="MostInnerItemStyle" />
                <AlternatingItemStyle CssClass="MostInnerAlernatingItemStyle" />
 
                                                        <Columns>
                                                             <telerik:GridBoundColumn Display="true"  HeaderText="xx" DataField="xx">
                                                             </telerik:GridBoundColumn>
 
                                                             <telerik:GridBoundColumn Display="true"  HeaderText="xx" DataField="xx">
                                                             </telerik:GridBoundColumn>
 
                                                             <telerik:GridAttachmentColumn  SortExpression="xx" DataSourceID="SqlDataSource1" MaxFileSize="1048576"
                                                                HeaderText="" AttachmentDataField="document" AttachmentKeyFields="xx" FileNameTextField="xx" DataTextField="xx" DataTextFormatString="Download File"
                                                                UniqueName="attachment"  >
                                                            </telerik:GridAttachmentColumn>
                                                        </Columns
                                                    </telerik:GridTableView>
                                                    
                                                </DetailTables>
 
....
 
<telerik:RadCodeBlock ID="RadCodeBlock3" runat="server">
    <script type="text/javascript">
 
        
 
     
 
        function gridCommand(sender, args) {
            var manager = $find('<%= RadAjaxManager.GetCurrent(Page).ClientID %>');
 
             
            if (args.get_commandName() == "DownloadAttachment") {
                manager.set_enableAJAX(false);
 
                setTimeout(function () {alert(args.get_commandName());
                    manager.set_enableAJAX(true);
                }, 0);
            }
        };
 
....

No answers yet. Maybe you can help?

Tags
Grid
Asked by
Darius
Top achievements
Rank 1
Share this question
or