
Dhamodharan
Top achievements
Rank 1
Dhamodharan
asked on 27 Jan 2011, 08:27 AM
Hi,
I am using radgrid and also nestedviewtemplate into radgrid. i am using export to PDF and EXCEL. but exporting only grid values not nested template value. i want to export nestedview template also.
Please see the attached the image. please give me solution for this issues.
Thanks,
Dhamu.
I am using radgrid and also nestedviewtemplate into radgrid. i am using export to PDF and EXCEL. but exporting only grid values not nested template value. i want to export nestedview template also.
Please see the attached the image. please give me solution for this issues.
Thanks,
Dhamu.
7 Answers, 1 is accepted
0

Princy
Top achievements
Rank 2
answered on 27 Jan 2011, 09:03 AM
Hello Dhamu,
I guess you are using IgnorePaging="true" before exporting. IgnorePaging will cause RadGrid to rebind before export and therefore your expanded items will collapse.
Hope this helps,
Princy.
I guess you are using IgnorePaging="true" before exporting. IgnorePaging will cause RadGrid to rebind before export and therefore your expanded items will collapse.
Hope this helps,
Princy.
0

Dhamodharan
Top achievements
Rank 1
answered on 27 Jan 2011, 09:15 AM
Hi Princy,
I am using IgnorePaging="false". but it has been returned empty PDF. please give me a alternate solution for this issue,
Thanks,
Dhamu.
I am using IgnorePaging="false". but it has been returned empty PDF. please give me a alternate solution for this issue,
Thanks,
Dhamu.
0
Hello Dhamu,
Can you please post your RadGrid declaration in this thread?
Note that if you are using scrolling/static headers you will have to turn them off before exporting as suggested in the following topic:
PDF export
Best regards,
Daniel
the Telerik team
Can you please post your RadGrid declaration in this thread?
Note that if you are using scrolling/static headers you will have to turn them off before exporting as suggested in the following topic:
PDF export
Best regards,
Daniel
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0

Dhamodharan
Top achievements
Rank 1
answered on 27 Jan 2011, 10:11 AM
Hi,
This is my code the radgrid.
<telerik:RadGrid ID="rgPayroll" DataSourceID="sdsPayroll" runat="server" Width="740px"
AutoGenerateColumns="False" AllowSorting="True" GridLines="None" AllowPaging="true" PageSize="15">
<ExportSettings ExportOnlyData="true" IgnorePaging="false" OpenInNewWindow="true">
</ExportSettings>
<MasterTableView DataSourceID="sdsPayroll" DataKeyNames="client_prc_id" HeaderStyle-HorizontalAlign="Center" ExpandCollapseColumn-Display="false" CommandItemDisplay="Top" HierarchyLoadMode="ServerBind" AllowMultiColumnSorting="True"
Width="100%">
<CommandItemSettings ShowExportToPdfButton="true" ShowExportToCsvButton="false" ShowExportToExcelButton="True"
ShowExportToWordButton="false" ShowAddNewRecordButton="False" />
<Columns>
<telerik:GridExpandColumn UniqueName="ExpandColumn" HeaderStyle-Width="30px" ItemStyle-HorizontalAlign="Center"></telerik:GridExpandColumn>
<telerik:GridBoundColumn SortExpression="description" HeaderText="Cycle" HeaderStyle-Font-Bold="true" HeaderButtonType="TextButton"
DataField="description" Resizable="True" Reorderable="True" HeaderStyle-Width="175px" />
<telerik:GridBoundColumn SortExpression="payroll_name" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center" HeaderText="Payroll Name"
HeaderButtonType="TextButton" DataField="payroll_name" Resizable="True" Reorderable="True" />
</Columns>
<NestedViewSettings DataSourceID="sdsPayrollSch">
<ParentTableRelation>
<telerik:GridRelationFields DetailKeyField="client_prc_id" MasterKeyField="client_prc_id" />
</ParentTableRelation>
</NestedViewSettings>
<NestedViewTemplate>
<asp:Panel ID="pnlPayrollSch" runat="server" CssClass="viewWrap" Width="650px">
<div class="contactWrap">
<fieldset style="padding: 10px;">
<legend style="padding: 5px;"><b>Schedule for : <%# Eval("payroll_name")%></b></legend>
<table>
<tbody>
<tr>
<td>
<telerik:RadGrid ID="rgPayrollSch" runat="server" AutoGenerateColumns="False"
DataSourceID="sdsPayrollSch" Width="600px" GridLins="Both">
<MasterTableView AutoGenerateColumns="false" HeaderStyle-HorizontalAlign="Center" >
<CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
<Columns>
<telerik:GridBoundColumn SortExpression="pay_period_number" HeaderStyle-Font-Bold="true" HeaderText="Period" HeaderButtonType="TextButton"
DataField="pay_period_number" Resizable="True" Reorderable="True" />
<telerik:GridBoundColumn SortExpression="payroll_date" HeaderStyle-Font-Bold="true" HeaderText="Process Date"
HeaderButtonType="TextButton" DataField="payroll_date" Resizable="True" Reorderable="True" />
<telerik:GridBoundColumn SortExpression="payroll_check_date" HeaderStyle-Font-Bold="true" HeaderText="Check Date"
HeaderButtonType="TextButton" DataField="payroll_check_date" Resizable="True"
Reorderable="True" />
<telerik:GridBoundColumn SortExpression="pay_period_start_date" HeaderStyle-Font-Bold="true" HeaderText="Pay Start Date"
HeaderButtonType="TextButton" DataField="pay_period_start_date" Resizable="True"
Reorderable="True" />
<telerik:GridBoundColumn SortExpression="pay_period_end_date" HeaderStyle-Font-Bold="true" HeaderText="Pay End Date"
HeaderButtonType="TextButton" DataField="pay_period_end_date" Resizable="True"
Reorderable="True" />
</Columns>
</MasterTableView>
<ClientSettings>
<Scrolling AllowScroll="true" UseStaticHeaders="true" SaveScrollPosition="true" />
<ClientEvents OnGridCreated="GridCreated" />
</ClientSettings>
</telerik:RadGrid>
</td>
</tr>
</tbody>
</table>
</fieldset>
</div>
</asp:Panel>
</NestedViewTemplate>
<%--<DetailTables>
<telerik:GridTableView AutoGenerateColumns="false" AllowSorting="false" DataSourceID="sdsPayrollSch">
<ParentTableRelation>
<telerik:GridRelationFields DetailKeyField="client_prc_id" MasterKeyField="client_prc_id" />
</ParentTableRelation>
<Columns>
<telerik:GridBoundColumn SortExpression="pay_period_number" HeaderStyle-Font-Bold="true" HeaderText="Period" HeaderButtonType="TextButton"
DataField="pay_period_number" Resizable="True" Reorderable="True" />
<telerik:GridBoundColumn SortExpression="payroll_date" HeaderStyle-Font-Bold="true" HeaderText="Process Date"
HeaderButtonType="TextButton" DataField="payroll_date" Resizable="True" Reorderable="True" />
<telerik:GridBoundColumn SortExpression="payroll_check_date" HeaderStyle-Font-Bold="true" HeaderText="Check Date"
HeaderButtonType="TextButton" DataField="payroll_check_date" Resizable="True"
Reorderable="True" />
<telerik:GridBoundColumn SortExpression="pay_period_start_date" HeaderStyle-Font-Bold="true" HeaderText="Pay Start Date"
HeaderButtonType="TextButton" DataField="pay_period_start_date" Resizable="True"
Reorderable="True" />
<telerik:GridBoundColumn SortExpression="pay_period_end_date" HeaderStyle-Font-Bold="true" HeaderText="Pay End Date"
HeaderButtonType="TextButton" DataField="pay_period_end_date" Resizable="True"
Reorderable="True" />
</Columns>
</telerik:GridTableView>
</DetailTables>--%>
</MasterTableView>
<ClientSettings>
<Scrolling AllowScroll="true" UseStaticHeaders="true" SaveScrollPosition="true" ScrollHeight="500px"/>
<ClientEvents OnGridCreated="GridCreated" />
</ClientSettings>
</telerik:RadGrid>
This is my code the radgrid.
<telerik:RadGrid ID="rgPayroll" DataSourceID="sdsPayroll" runat="server" Width="740px"
AutoGenerateColumns="False" AllowSorting="True" GridLines="None" AllowPaging="true" PageSize="15">
<ExportSettings ExportOnlyData="true" IgnorePaging="false" OpenInNewWindow="true">
</ExportSettings>
<MasterTableView DataSourceID="sdsPayroll" DataKeyNames="client_prc_id" HeaderStyle-HorizontalAlign="Center" ExpandCollapseColumn-Display="false" CommandItemDisplay="Top" HierarchyLoadMode="ServerBind" AllowMultiColumnSorting="True"
Width="100%">
<CommandItemSettings ShowExportToPdfButton="true" ShowExportToCsvButton="false" ShowExportToExcelButton="True"
ShowExportToWordButton="false" ShowAddNewRecordButton="False" />
<Columns>
<telerik:GridExpandColumn UniqueName="ExpandColumn" HeaderStyle-Width="30px" ItemStyle-HorizontalAlign="Center"></telerik:GridExpandColumn>
<telerik:GridBoundColumn SortExpression="description" HeaderText="Cycle" HeaderStyle-Font-Bold="true" HeaderButtonType="TextButton"
DataField="description" Resizable="True" Reorderable="True" HeaderStyle-Width="175px" />
<telerik:GridBoundColumn SortExpression="payroll_name" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center" HeaderText="Payroll Name"
HeaderButtonType="TextButton" DataField="payroll_name" Resizable="True" Reorderable="True" />
</Columns>
<NestedViewSettings DataSourceID="sdsPayrollSch">
<ParentTableRelation>
<telerik:GridRelationFields DetailKeyField="client_prc_id" MasterKeyField="client_prc_id" />
</ParentTableRelation>
</NestedViewSettings>
<NestedViewTemplate>
<asp:Panel ID="pnlPayrollSch" runat="server" CssClass="viewWrap" Width="650px">
<div class="contactWrap">
<fieldset style="padding: 10px;">
<legend style="padding: 5px;"><b>Schedule for : <%# Eval("payroll_name")%></b></legend>
<table>
<tbody>
<tr>
<td>
<telerik:RadGrid ID="rgPayrollSch" runat="server" AutoGenerateColumns="False"
DataSourceID="sdsPayrollSch" Width="600px" GridLins="Both">
<MasterTableView AutoGenerateColumns="false" HeaderStyle-HorizontalAlign="Center" >
<CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
<Columns>
<telerik:GridBoundColumn SortExpression="pay_period_number" HeaderStyle-Font-Bold="true" HeaderText="Period" HeaderButtonType="TextButton"
DataField="pay_period_number" Resizable="True" Reorderable="True" />
<telerik:GridBoundColumn SortExpression="payroll_date" HeaderStyle-Font-Bold="true" HeaderText="Process Date"
HeaderButtonType="TextButton" DataField="payroll_date" Resizable="True" Reorderable="True" />
<telerik:GridBoundColumn SortExpression="payroll_check_date" HeaderStyle-Font-Bold="true" HeaderText="Check Date"
HeaderButtonType="TextButton" DataField="payroll_check_date" Resizable="True"
Reorderable="True" />
<telerik:GridBoundColumn SortExpression="pay_period_start_date" HeaderStyle-Font-Bold="true" HeaderText="Pay Start Date"
HeaderButtonType="TextButton" DataField="pay_period_start_date" Resizable="True"
Reorderable="True" />
<telerik:GridBoundColumn SortExpression="pay_period_end_date" HeaderStyle-Font-Bold="true" HeaderText="Pay End Date"
HeaderButtonType="TextButton" DataField="pay_period_end_date" Resizable="True"
Reorderable="True" />
</Columns>
</MasterTableView>
<ClientSettings>
<Scrolling AllowScroll="true" UseStaticHeaders="true" SaveScrollPosition="true" />
<ClientEvents OnGridCreated="GridCreated" />
</ClientSettings>
</telerik:RadGrid>
</td>
</tr>
</tbody>
</table>
</fieldset>
</div>
</asp:Panel>
</NestedViewTemplate>
<%--<DetailTables>
<telerik:GridTableView AutoGenerateColumns="false" AllowSorting="false" DataSourceID="sdsPayrollSch">
<ParentTableRelation>
<telerik:GridRelationFields DetailKeyField="client_prc_id" MasterKeyField="client_prc_id" />
</ParentTableRelation>
<Columns>
<telerik:GridBoundColumn SortExpression="pay_period_number" HeaderStyle-Font-Bold="true" HeaderText="Period" HeaderButtonType="TextButton"
DataField="pay_period_number" Resizable="True" Reorderable="True" />
<telerik:GridBoundColumn SortExpression="payroll_date" HeaderStyle-Font-Bold="true" HeaderText="Process Date"
HeaderButtonType="TextButton" DataField="payroll_date" Resizable="True" Reorderable="True" />
<telerik:GridBoundColumn SortExpression="payroll_check_date" HeaderStyle-Font-Bold="true" HeaderText="Check Date"
HeaderButtonType="TextButton" DataField="payroll_check_date" Resizable="True"
Reorderable="True" />
<telerik:GridBoundColumn SortExpression="pay_period_start_date" HeaderStyle-Font-Bold="true" HeaderText="Pay Start Date"
HeaderButtonType="TextButton" DataField="pay_period_start_date" Resizable="True"
Reorderable="True" />
<telerik:GridBoundColumn SortExpression="pay_period_end_date" HeaderStyle-Font-Bold="true" HeaderText="Pay End Date"
HeaderButtonType="TextButton" DataField="pay_period_end_date" Resizable="True"
Reorderable="True" />
</Columns>
</telerik:GridTableView>
</DetailTables>--%>
</MasterTableView>
<ClientSettings>
<Scrolling AllowScroll="true" UseStaticHeaders="true" SaveScrollPosition="true" ScrollHeight="500px"/>
<ClientEvents OnGridCreated="GridCreated" />
</ClientSettings>
</telerik:RadGrid>
0

Dhamodharan
Top achievements
Rank 1
answered on 27 Jan 2011, 10:49 AM
Hi,
Please give me suggestions for this issue.
Thanks,
dhamu.
Please give me suggestions for this issue.
Thanks,
dhamu.
0

Dhamodharan
Top achievements
Rank 1
answered on 27 Jan 2011, 10:50 AM
Hi Princy,
give me a tips for this issues.
Thanks,
Dhamu,
give me a tips for this issues.
Thanks,
Dhamu,
0

Princy
Top achievements
Rank 2
answered on 28 Jan 2011, 06:31 AM
Hello Dhamu,
You need to disable the Scrolling/StaticHeaders functionality before exporting to PDF. Please take a look at the following documentation.
PDF export
Also refer the following forum which discusses the same scenario.
RadGrid PDF Export issue
Thanks,
Princy.
You need to disable the Scrolling/StaticHeaders functionality before exporting to PDF. Please take a look at the following documentation.
PDF export
Also refer the following forum which discusses the same scenario.
RadGrid PDF Export issue
Thanks,
Princy.