ExportToPDF not working

9 posts, 0 answers
  1. Amit
    Amit avatar
    5 posts
    Member since:
    Aug 2008

    Posted 20 Sep 2008 Link to this post

    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>

  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 21 Sep 2008 Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Amit
    Amit avatar
    5 posts
    Member since:
    Aug 2008

    Posted 22 Sep 2008 Link to this post

    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
  5. Maas Prog
    Maas Prog avatar
    48 posts
    Member since:
    Oct 2005

    Posted 19 Feb 2010 Link to this post

    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

  6. -DJ-
    -DJ- avatar
    263 posts
    Member since:
    Oct 2004

    Posted 27 Aug 2010 Link to this post

    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-
  7. Daniel
    Admin
    Daniel avatar
    4943 posts

    Posted 02 Sep 2010 Link to this post

    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
  8. John Cooney
    John Cooney avatar
    26 posts
    Member since:
    Aug 2009

    Posted 07 Dec 2010 Link to this post

    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="#".
  9. Daniel
    Admin
    Daniel avatar
    4943 posts

    Posted 10 Dec 2010 Link to this post

    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.
  10. Daniel
    Admin
    Daniel avatar
    4943 posts

    Posted 24 Dec 2010 Link to this post

    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.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017