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

ExportToPdf - Add record count beneath title

2 Answers 50 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 22 Oct 2009, 02:24 PM
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 Answers, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 23 Oct 2009, 01:30 PM
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.
0
Michael
Top achievements
Rank 1
answered on 23 Oct 2009, 01:33 PM
Thank you very much! That is exactly what I was looking for.
Tags
Chart (Obsolete)
Asked by
Michael
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Michael
Top achievements
Rank 1
Share this question
or