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

Export not working for Radgrid nestedviewTemplate

3 Answers 185 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Dhamodharan
Top achievements
Rank 1
Dhamodharan asked on 27 Jan 2012, 11:06 AM
Hi,

I am using radgrid nestedviewTemplate. export to PDF and Excel is not working. i have attached the code. please check and let me know how to solve this problem.

i have attached error message image also.

 <telerik:RadGrid ID="rgGlList" AllowFilteringByColumn="True" DataSourceID="sdsGlList"
                            runat="server" AutoGenerateColumns="False" AllowSorting="True" AllowPaging="True"
                            PageSize="15" GridLines="None" ClientSettings-Scrolling-AllowScroll="true"
                            Width="740px" CellSpacing="0">
                            <ExportSettings ExportOnlyData="true" IgnorePaging="True" OpenInNewWindow="true">
                                <Pdf PageWidth="1000px" Title="General Ledger List" />
                            </ExportSettings>
                            <MasterTableView DataSourceID="sdsGlList" DataKeyNames="pay_gl_id" Width="740px"
                                ExpandCollapseColumn-Display="false" CommandItemDisplay="Top" HeaderStyle-HorizontalAlign="Center"
                                AllowMultiColumnSorting="True" HierarchyLoadMode="ServerBind" TableLayout="Fixed">
                                <CommandItemSettings ShowExportToPdfButton="true" ShowExportToCsvButton="false" ShowExportToExcelButton="True"
                                    ShowExportToWordButton="false" ShowAddNewRecordButton="False" />
                                <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                                </RowIndicatorColumn>
                                <ExpandCollapseColumn Display="False"
                                    FilterControlAltText="Filter ExpandColumn1 column" UniqueName="ExpandColumn1"
                                    Visible="True">
                                </ExpandCollapseColumn>
                                <Columns>
                                    <telerik:GridExpandColumn HeaderStyle-Width="30px"
                                        ItemStyle-HorizontalAlign="Center" UniqueName="ExpandColumn">
                                        <HeaderStyle Width="30px" />
                                        <ItemStyle HorizontalAlign="Center" />
                                    </telerik:GridExpandColumn>
                                    <telerik:GridBoundColumn AllowSorting="true" DataField="GLNumber"
                                        FilterControlWidth="60px" HeaderStyle-Font-Bold="true" HeaderText="GL Number"
                                        SortExpression="GLNumber">
                                        <HeaderStyle Width="110px" />
                                    </telerik:GridBoundColumn>                                  
                                </Columns>
                                <NestedViewSettings DataSourceID="sdsGlChildList">
                                    <ParentTableRelation>
                                        <telerik:GridRelationFields DetailKeyField="pay_gl_id" MasterKeyField="pay_gl_id" />
                                    </ParentTableRelation>
                                </NestedViewSettings>
                                <NestedViewTemplate>
                                    <asp:Panel ID="pnlGlChildList" runat="server" CssClass="viewWrap" Width="650px">
                                        <div class="contactWrap">
                                            <fieldset style="padding: 10px;">
                                                <legend style="padding: 5px;"><b>Custom GL Details for :&nbsp; &nbsp;<%# Eval("Parent_GL_Number")%></b></legend>
                                                <table>
                                                    <tbody>
                                                        <tr>
                                                            <td>
                                                                <telerik:RadGrid ID="rgGlChildList" runat="server" AutoGenerateColumns="False" DataSourceID="sdsGlChildList"
                                                                    Width="600px" GridLins="Both" CellSpacing="0" GridLines="None">
                                                                    <MasterTableView AutoGenerateColumns="false" HeaderStyle-HorizontalAlign="Center">
                                                                        <CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
                                                                        <Columns>
                                                                            <telerik:GridBoundColumn HeaderText="Location" HeaderStyle-Font-Bold="true" DataField="REPLOC">
                                                                            </telerik:GridBoundColumn>                                                                       
                                                                        </Columns>
                                                                    </MasterTableView>
                                                                    <HeaderStyle Wrap="false" />
                                                                </telerik:RadGrid>
                                                            </td>
                                                        </tr>
                                                    </tbody>
                                                </table>
                                            </fieldset>
                                        </div>
                                    </asp:Panel>
                                </NestedViewTemplate>                      
                            </MasterTableView>                          
                            <GroupingSettings CaseSensitive="False" />
                            <HeaderStyle Wrap="false" />
                            <FilterMenu EnableImageSprites="False">
                            </FilterMenu>
                            <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
                            </HeaderContextMenu>
                        </telerik:RadGrid>


Thanks,
Dhamu.

3 Answers, 1 is accepted

Sort by
0
Richard
Top achievements
Rank 1
answered on 31 Jan 2012, 02:37 PM
dhamu:

Is your RadGrid using AJAX? IF so, you may want to reference the Export from Ajaxified Grid documentation page for insights.

Hope this helps!
0
Dhamodharan
Top achievements
Rank 1
answered on 02 Feb 2012, 07:49 AM
Hello jumpstart,

already i disabled ajax. but i got the same problem. please check my code and please let me know how to solve this issue.

current i am using Q3 2011, but before verson export only parent record. but this verson return error.

Thanks,
Dhamu
0
Daniel
Telerik team
answered on 02 Feb 2012, 02:51 PM
Hi Dhamu,

I recommend that you try disabling the IgnorePaging and/or ExportOnlyData properties.
Let me know whether this helps.

Regards,
Daniel
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
Grid
Asked by
Dhamodharan
Top achievements
Rank 1
Answers by
Richard
Top achievements
Rank 1
Dhamodharan
Top achievements
Rank 1
Daniel
Telerik team
Share this question
or