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

radgrid export to excel failed

1 Answer 118 Views
Grid
This is a migrated thread and some comments may be shown as answers.
dong
Top achievements
Rank 1
dong asked on 27 May 2014, 11:58 AM
I have tried to follow the demo of radgrid export to excel,but there are some problems.

1.I click the export button,the page refresh and show the table only,no dialogue of  open/save/save as,  to export the file like demo.Please help me,thank you. 

2. ShowExportToExcelButton="true",but the button doesn't display. Can RadToolBarButton cause this? I used RadToolBarButton for ExportToExcel at first.

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 27 May 2014, 12:28 PM
Hi Dong,

The exporting feature works only with regular postbacks. This means, that the asynchronous postback should be canceled when performing an export.More information on this topic is available below:
Export from ajaxified grid

If you use CommandItemTemplate, every control you need should be added inside it. Check the below code snippet:

ASPX:
<MasterTableView CommandItemDisplay="Top">
    <CommandItemTemplate>
        <telerik:RadToolBar ID="RadToolBar1" runat="server" AutoPostBack="true">
            <Items>
             <telerik:RadToolBarButton Text="Export To Excel" CommandName="ExportToExcel">
             </telerik:RadToolBarButton>
            </Items>
        </telerik:RadToolBar>
    </CommandItemTemplate>
</MasterTableView>

Thanks,
Shinu
Tags
Grid
Asked by
dong
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or