ExportToPdf - Add record count beneath title

Thread is closed for posting
3 posts, 0 answers
  1. Michael
    Michael avatar
    4 posts
    Member since:
    Oct 2009

    Posted 22 Oct 2009 Link to this post

    How would I go about adding the record count beneath the title of a pdf document created using the ExportToPdf functionality of RadGrid? Seems like a simple task, but haven't been able to figure it out yet. Any help would be greatly appreciated!
  2. Daniel
    Admin
    Daniel avatar
    4949 posts

    Posted 23 Oct 2009 Link to this post

    Hello Michael,

    Try the following approach:
    protected void RadGrid1_PdfExporting(object source, GridPdfExportingArgs e)
    {
        string itemCount = "Records count: " + RadGrid1.Items.Count;
        e.RawHTML = itemCount + e.RawHTML;
    }

    Protected Sub RadGrid1_PdfExporting(source As Object, e As GridPdfExportingArgs) Handles RadGrid1.PdfExporting
        Dim itemCount As String = "Records count: " + RadGrid1.Items.Count
        e.RawHTML = itemCount + e.RawHTML
    End Sub

    Let me know whether this helps.

    Regards,
    Daniel
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. Michael
    Michael avatar
    4 posts
    Member since:
    Oct 2009

    Posted 23 Oct 2009 Link to this post

    Thank you very much! That is exactly what I was looking for.
Back to Top