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

Export RADGrid to PDF

1 Answer 22 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Vivek
Top achievements
Rank 1
Vivek asked on 08 Apr 2015, 01:06 PM
Hi,

I am using a pop up with a Telerik grid with the following code. When I click on the default image of word/excel, I am unable to export the data on the grid and I am redirected to the primary page. I am using paging in my code.

<RadGrid ID="" runat="server" Width="100%" AutoGenerateColumns="false"
                            AlternatingRowStyle-CssClass="alternatingRowCss" GridLines="None" HeaderStyle-CssClass="gridHeader"
                            RowStyle-CssClass="windowShade" ShowHeader="true" HeaderStyle-Height="20px" AllowPaging="true"
                            PageSize="10">
                             < HideStructureColumns="true">
     </>


                            <PagerStyle Mode="NumericPages" Height="25px"></PagerStyle>
                            <MasterTableView Width="100%" AllowMultiColumnSorting="True" HierarchyLoadMode="ServerOnDemand" CommandItemDisplay="Top" Style="padding: 3px;" >
                                < ShowExportToWordButton="true"  ShowExportToCsvButton ="true" showAddNewRecordButton="false">
     </>
                                <Columns>
                                    <GridTemplateColumn>
                                        <>
                                            < width="100%">
                                            <tr class="gridHeader" style="height: 20px">
                                                < width="35%">Status
                                                </>
                                                < width="35%">Date
                                                </>
                                                < width="30%">Updated By
                                                </>
                                            </>
                                        </>
                                     </>
                                        <>
                                            < width="100%">
                                            <>
                                                < width="35%" class="" style="padding: 3px;">
                                                    <Label runat="server" ID="" Text='<%# Eval"Status") %>'></aspLabel>
                                                </>
                                                < width="35%" class="" align="center" style="padding: 3px;">
                                                    <asp:Label runat="server" ID="historyUpdatedOn" Text='<%# Eval("UpdatedOn", "{0:MM/dd/yyyy}") %>'></asp:Label>
                                                </>
                                                < width="30%" class="" align="center" style="padding: 3px;">
                                                    <Label runat="server" ID="HistoryCreatedBy" Text='<%# Eval"") %>'></aspLabel>
                                                </>
                                            </>
                                        </>
                                      </>
                                    </GridTemplateColumn>
                               </Columns>
                                <>
                                    < width="100%" border="0" cellpadding="20" cellspacing="20">
                                        <>
                                            < align="left" style="padding-left: 10px; font-family: Verdana">
                                                <h2 style="color: Black; font-size: small">There are no records to display</h2>
                                            </>
                                        </>
                                    </>
                                </>
                            </>
                        </RadGrid>

1 Answer, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 13 Apr 2015, 07:42 AM
Hello Vivek,

Judging by the description of the problem, the export button is ajaxified. You have to cancel the ajax request when exporting, otherwise this functionality would not work.
You can find more information here:
Export from Ajaxified Grid

Regards,
Daniel
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
Tags
General Discussions
Asked by
Vivek
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Share this question
or