Hi,
I have one rad grid with export to pdf functionality. I have put one html table in item command template which contains, image, report name, generated datetime etc. I add this table which looks like report header. But when I click on export to pdf link in command item template, it does not export command item template data. If I remove table and write text direct into command item template than it works fine and I can see text from command item template to pdf. But I can't format header data without table so I can't remove table from command item template. Export to excel and word works fine.
Can any one help me in this? Columns in below grid are generating at run time.
I have one rad grid with export to pdf functionality. I have put one html table in item command template which contains, image, report name, generated datetime etc. I add this table which looks like report header. But when I click on export to pdf link in command item template, it does not export command item template data. If I remove table and write text direct into command item template than it works fine and I can see text from command item template to pdf. But I can't format header data without table so I can't remove table from command item template. Export to excel and word works fine.
Can any one help me in this? Columns in below grid are generating at run time.
<
telerik:RadGrid
ID
=
"radGridReportData"
runat
=
"server"
BorderStyle
=
"None"
GridLines
=
"None"
AutoGenerateColumns
=
"false"
ShowFooter
=
"true"
Width
=
"1000px"
AllowPaging
=
"false"
AllowSorting
=
"true"
AllowFilteringByColumn
=
"true"
AllowAutomaticUpdates
=
"false"
ShowGroupPanel
=
"false"
OnNeedDataSource
=
"radGridReportData_NeedDataSource"
OnItemCommand
=
"radGridReportData_ItemCommand"
OnItemCreated
=
"radGridReportData_ItemCreated"
OnItemDataBound
=
"radGridReportData_ItemDataBound"
>
<
ExportSettings
IgnorePaging
=
"true"
OpenInNewWindow
=
"true"
>
<
Pdf
PageHeight
=
"210mm"
PageWidth
=
"297mm"
PageBottomMargin
=
"20mm"
PageTopMargin
=
"20mm"
PageLeftMargin
=
"20mm"
PageRightMargin
=
"20mm"
/>
</
ExportSettings
>
<
ClientSettings
AllowGroupExpandCollapse
=
"True"
ReorderColumnsOnClient
=
"False"
AllowDragToGroup
=
"false"
AllowColumnsReorder
=
"False"
EnableRowHoverStyle
=
"True"
>
<
Selecting
AllowRowSelect
=
"false"
/>
<
ClientEvents
OnGridCreated
=
"OnGridCreated"
/>
</
ClientSettings
>
<
GroupingSettings
ShowUnGroupButton
=
"true"
CaseSensitive
=
"false"
/>
<
MasterTableView
Width
=
"100%"
CommandItemDisplay
=
"Top"
GroupLoadMode
=
"Client"
ShowGroupFooter
=
"true"
>
<
CommandItemTemplate
>
<
div
>
<
table
border
=
"0"
cellpadding
=
"0"
cellspacing
=
"0"
width
=
"100%"
>
<
tr
>
<
td
colspan
=
"2"
valign
=
"top"
align
=
"center"
style="color: White; font-weight: bold;
font-size: 16px;">
<%# radComboReport.Text %>
</
td
>
</
tr
>
<
tr
>
<
td
colspan
=
"2"
valign
=
"top"
style
=
"color: White;"
>
<
table
border
=
"0"
cellpadding
=
"0"
cellspacing
=
"0"
width
=
"1000px"
>
<
tr
>
<
td
valign
=
"top"
style
=
"color: White; width: 800px;"
>
<
b
>Source: </
b
>
<%# radComboSource.Text %>
</
td
>
<
td
valign
=
"top"
style
=
"color: White;"
>
<
b
>Run By:</
b
>
<%# GetUserName() %>
</
td
>
</
tr
>
<
tr
>
<
td
valign
=
"top"
style
=
"color: White; width: 800px;"
>
<
b
>Recon: </
b
>
<%# radRecons.Text %>
</
td
>
<
td
valign
=
"top"
style
=
"color: White;"
>
<
b
>Run Date:</
b
>
<%# System.DateTime.Now.ToShortDateString() %>
</
td
>
</
tr
>
</
table
>
</
td
>
</
tr
>
<
tr
>
<
td
valign
=
"top"
style
=
"color: White;"
>
<
asp:CheckBox
ID
=
"chkShowHideFilters"
runat
=
"server"
CssClass
=
"tdText"
Checked
=
"false"
onclick
=
"showHideFilterItem(this.checked);"
/>
<
b
>Show Filter</
b
>
</
td
>
<
td
align
=
"right"
valign
=
"top"
style
=
"color: White;"
>
<
b
>Export</
b
>
<
asp:LinkButton
ID
=
"btnExportToExcel"
runat
=
"server"
CommandName
=
"ExportToExcel"
>
<
img
src
=
"Images/Icons/excel.png"
alt
=
"Export to Excel"
style
=
"border: 0px; vertical-align: middle;"
/>
</
asp:LinkButton
>
<
asp:LinkButton
ID
=
"btnExportToWord"
runat
=
"server"
CommandName
=
"ExportToWord"
>
<
img
src
=
"Images/Icons/word.png"
alt
=
"Export to Word"
style
=
"border: 0px; vertical-align: middle;"
/>
</
asp:LinkButton
>
<
asp:LinkButton
ID
=
"btnExportToPDF"
runat
=
"server"
CommandName
=
"ExportToPdf"
>
<
img
src
=
"Images/Icons/pdf.png"
alt
=
"Export to PDF"
style
=
"border: 0px; vertical-align: middle;"
/>
</
asp:LinkButton
>
</
td
>
</
tr
>
</
table
>
</
div
>
</
CommandItemTemplate
>
<
HeaderStyle
Font-Bold
=
"true"
/>
<
Columns
/>
</
MasterTableView
>
</
telerik:RadGrid
>