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 : <%# 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.
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 : <%# 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.