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

Telerik - Export to PDF does not includes column headers***Urgent***

1 Answer 42 Views
Grid
This is a migrated thread and some comments may be shown as answers.
LNC
Top achievements
Rank 1
LNC asked on 01 Jul 2013, 09:09 AM
Hi Team,

I am trying to export RadGrid data to PDF and using ExportToPdf method for the same.
But, ExportToPdf is not including the column headers in PDF Report when
- RadGrid's AutoGenerateColumns = "true"
- RadGrid is not having GridDataBoundColumn

Code Snippet:
<telerik:RadGrid ID="radABCReportGrid" runat="server" Width="100%" AutoGenerateColumns="true" Skin="Default" Visible="true" BackColor="White">
<ExportSettings ExportOnlyData="True" IgnorePaging="True" OpenInNewWindow="true">
<Csv ColumnDelimiter="VerticalBar" RowDelimiter="Comma" EncloseDataWithQuotes="true" />
<Pdf PageHeight="210mm" PageWidth="297mm" DefaultFontFamily="Arial Unicode MS" PageBottomMargin="10mm" PageTopMargin="10mm" PageLeftMargin="10mm" PageRightMargin="10mm"></Pdf>
</ExportSettings>
</telerik:RadGrid>

NOTE: ExportToExcel works for the same with same properties.

Telerik: Telerik.Web.UI.dll , Vesion: 2011.1.413.40

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 02 Jul 2013, 12:14 PM
Hi,

I have tried your code and it works fine at my end. Can you provide the full code.
Below is the code snippet I tried.

ASPX:
<telerik:RadGrid ID="Radgrid1" runat="server" Width="100%" AutoGenerateColumns="true"
    Skin="Default" Visible="true" BackColor="White" >
    <ExportSettings ExportOnlyData="True" IgnorePaging="True" OpenInNewWindow="true">              
        <Pdf PageHeight="210mm" PageWidth="297mm" DefaultFontFamily="Arial Unicode MS" PageBottomMargin="10mm"
            PageTopMargin="10mm" PageLeftMargin="10mm" PageRightMargin="10mm"></Pdf>
    </ExportSettings>
    <MasterTableView CommandItemDisplay="Top" >
        <CommandItemSettings ShowExportToPdfButton="true" />
    </MasterTableView>
</telerik:RadGrid>

Thanks,
Princy
Tags
Grid
Asked by
LNC
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or