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

Export to PDF / Word - RadGrid with template columns

3 Answers 164 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Karan
Top achievements
Rank 1
Karan asked on 30 Jan 2013, 12:41 AM
Hi,

I have a RadGrid control with multiple template columns, most of the template are defined like this

<table class="itemLinkColumnTable">
<tr>
<td class="imageColumn"<img runat="server" id="Icon" class="itemIcon" align="top" /> </td>
        <td<a id="Link" runat="server" class="titleText" href="javascript:void(0);"> </a</td>
</tr>
</table>

The template has an Image and a link next to it.  It works fine when the Grid view is displays in the browser, but when I export this to PDF / Excel or Word by setting this property and clicking on the export button on the browser

RadGrid.MasterTableView.CommandItemSettings.ShowExportToPdfButton = true;<br><span style="font-size: 11px; line-height: 1.4;">RadGrid.MasterTableView.CommandItemSettings.ShowExportToExcelButton = true;</span><br><span style="font-size: 11px; line-height: 1.4;">RadGrid.MasterTableView.CommandItemSettings.ShowExportToWordButton = true;</span>

In the exported data the Template Columns are left as blank.  When on the export settings I set the ExportOnlyData="false"
I see all kinds of garbage being exported. Please have a look at the attached screen shot.

Why is the grid not being exported the way it looks in the browser ? Please let me know how to achieve this.

Thanks

3 Answers, 1 is accepted

Sort by
0
Karan
Top achievements
Rank 1
answered on 30 Jan 2013, 04:14 AM
Does anyone have an answer to this problem ?  Please help, Thanks.
0
Karan
Top achievements
Rank 1
answered on 31 Jan 2013, 12:12 AM
 ? 
0
Daniel
Telerik team
answered on 01 Feb 2013, 04:34 PM
Hello Karan,

RadGrid cannot export itself exactly in the way it is displayed in the browser. The developer has to configure it to behave in the way it expects it to behave. There is an example in our demos:
Export to PDF demo

The problem with the images in the PDF file is related to a limitation (transparency is not supported) in the PDF 1.3 version which is used by our control.
If you post your markup here I will try to help you resolve the other problems.

Best 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
Karan
Top achievements
Rank 1
Answers by
Karan
Top achievements
Rank 1
Daniel
Telerik team
Share this question
or