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

Exporting breaks all subsequent submits

1 Answer 32 Views
Grid
This is a migrated thread and some comments may be shown as answers.
rg
Top achievements
Rank 1
rg asked on 06 Aug 2012, 03:53 PM
I have the following code: 

<telerik:RadGrid ID="AuditRadGrid" runat="server" AllowPaging="true" AllowCustomPaging="true"
    OnNeedDataSource="AuditRadGrid_NeedDataSource">
    <ExportSettings HideStructureColumns="true"  IgnorePaging="true"/>
    <MasterTableView AutoGenerateColumns="false" DataKeyNames="ActivityDate" CommandItemDisplay="Top"
        CommandItemStyle-HorizontalAlign="Right">
        <CommandItemSettings ShowAddNewRecordButton="false" ShowExportToExcelButton="true"
            ShowExportToCsvButton="true" ShowRefreshButton="false" />
        <Columns>
            <telerik:GridBoundColumn HeaderText="Date" DataField="ActivityDate" Visible="true" />
            <telerik:GridBoundColumn HeaderText="Change" DataField="ActivityDescription" Visible="true" />
            <telerik:GridBoundColumn HeaderText="Username" DataField="ActivityByUserName" Visible="true" />
        </Columns>
        <PagerStyle AlwaysVisible="true" />
    </MasterTableView>
</telerik:RadGrid>

This works as expected when I click either Excel or CSV export icon. The problem is that after clicking an export icons the first time, no other submits on the page work.

I refresh the page, click Excel, an Excel file is exported. I click CSV, and nothing happens. I click my other submit buttons on the form, and nothing happens.

Anyone have  ideas on this?


1 Answer, 1 is accepted

Sort by
0
rg
Top achievements
Rank 1
answered on 06 Aug 2012, 04:15 PM
http://www.telerik.com/help/aspnet-ajax/grid-export.html 

This looks to be a known issue within a SharePoint webpart.

The above link contains a link with several workarounds. Here is what I ended up using.


<script type="text/javascript" language="javascript">
    //sharepoint postback to work after clicking on telerik export to pdf
    if (typeof (_spBodyOnLoadFunctionNames) != 'undefined' && _spBodyOnLoadFunctionNames != null) {
        _spBodyOnLoadFunctionNames.push("supressSubmitWraper");
    }
    function supressSubmitWraper() {
        _spSuppressFormOnSubmitWrapper = true;
    }
</script>

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