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

Add URL Link in Exported PDF

1 Answer 40 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Scott Lapp
Top achievements
Rank 1
Scott Lapp asked on 11 Feb 2010, 06:35 PM
Hi, I am exporting a RadGrid to PDF. Everything works great.

I now want to add an href URL link into the PDF but outside of the grid. Is this possible?

My preference would be just below the Page Title.

Thanks,

Scott

1 Answer, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 17 Feb 2010, 09:24 AM
Hello Scott,

This is possible to some extent, even though RadGrid doesn't support it out-of-the-box.
protected void RadGrid1_PdfExporting(object source, GridPdfExportingArgs e)
{
    string tableWrapper = "<table style='width:100%; padding-bottom: 70px;'><colgroup><col /></colgroup><tr><td style='text-align: center'>{0}</td></tr></table>";
    string link = "<a href='http://www.google.com' style='text-align: center; width: 100%'>Google</a>";
    e.RawHTML = String.Format(tableWrapper, link) + e.RawHTML;
}

Best 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.
Tags
Grid
Asked by
Scott Lapp
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Share this question
or