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

ExportToPDF not working

8 Answers 233 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Amit
Top achievements
Rank 1
Amit asked on 20 Sep 2008, 06:36 PM
I have a grid that I am trying to do the export.  When I execute the following, nothing happens.

gridList.ExportSettings.FileName =

"test"

gridList.ExportSettings.OpenInNewWindow =

True

gridList.MasterTableView.ExportToPdf()



This is the grid:

<telerik:RadGrid ID="gridList" runat="server" EnableViewState="true" AllowMultiRowSelection="true" >
<MasterTableView TableLayout="Auto">
<Columns>
<telerik:GridBoundColumn DataField="Col1" DataType="System.String" HeaderText="Term Description"

UniqueName="TC_TermDescription" Visible="true" />

 

</Columns>

 

</MasterTableView>

 

<ClientSettings AllowColumnsReorder="false" ReorderColumnsOnClient="true" ClientEvents-OnGridCreated="gridCreated">

 

<Resizing ClipCellContentOnResize="true" AllowRowResize="false" EnableRealTimeResize="true"

 

ResizeGridOnColumnResize="true" AllowColumnResize="true" />

 

</ClientSettings>

 

</telerik:RadGrid>

8 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 22 Sep 2008, 04:55 AM
Hi Amit,

Have you ajaxified the Grid? The exporting feature of the control work with regular postbacks only. You can refer the following help article to get more details on this regard.
Export from ajaxified grid

Thanks
Shinu
0
Amit
Top achievements
Rank 1
answered on 22 Sep 2008, 03:54 PM
The grid is inside a RadAjax panel.  When I try what the article shows, I do not see the attribute "EnableAjax". 

Putting the "ClientEvents-OnRequestStart="pnlRequestStarted"" on the RadAjaxPanel does not seem to do anything.

If I take the grid out of the panel I get:
Telerik.Web.Apoc.ApocException: internal-destination or external-destination must be specified in basic-link

Any ideas?

Thanks,
Amit
0
Maas Prog
Top achievements
Rank 1
answered on 20 Feb 2010, 12:14 AM
This is a really old post, but I had same problem using current version (Q3 2009 latest) and got it to work by setting visible to false for any column that contains hyperlinks just before exporting the grid:
   Protected Sub butExportToPDF_Click(ByVal sender As Object, ByVal e As System.EventArgs)
        'get rid of the attachment links for report     
        RadGrid1.Columns.FindByUniqueName("ShowAttachments").Visible = False
        RadGrid1.MasterTableView.ExportToPdf()
    End Sub
Ford

0
-DJ-
Top achievements
Rank 1
answered on 27 Aug 2010, 02:40 PM
This problem seems to be active in Q2 2010 as well.

Is there a quick solution to displaying links when you export pdf from Radgrid?

Regards,
-DJ-
0
Daniel
Telerik team
answered on 02 Sep 2010, 10:45 AM
Hello guys,

This problem occurs when you have an empty anchors. For example:
<a href="#">some text</a>

The PDF parser considers this as an invalid link and throws an exception.

Kind regards,
Daniel
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
John Cooney
Top achievements
Rank 1
answered on 07 Dec 2010, 04:07 PM
The PDF parser considers this as an invalid link and throws an exception.


Why?  If I have a non-existent link, what does that matter to the export function?  It's not going to show the actual link anyway, just show the text.

I have this same problem.  I have a multi function column in which some rows are a link and other rows just show their text with no link in this particular column so those rows just have href="#".
0
Daniel
Telerik team
answered on 10 Dec 2010, 04:37 PM
Hello John,

This is by design. We will research whether it is possible to remove this limitation without introducing breaking changes.


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
Daniel
Telerik team
answered on 24 Dec 2010, 10:48 PM
Hello John,

Indeed, this behavior is annoying so we decided to change it. You will be able to download an internal build containing this fix in the beginning of the next week.

Kind 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.
Tags
Grid
Asked by
Amit
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Amit
Top achievements
Rank 1
Maas Prog
Top achievements
Rank 1
-DJ-
Top achievements
Rank 1
Daniel
Telerik team
John Cooney
Top achievements
Rank 1
Share this question
or