3 Answers, 1 is accepted
0

Shinu
Top achievements
Rank 2
answered on 12 Dec 2012, 05:00 AM
Hi,
Try the following code to achieve your scenario.
C#:
Thanks,
Shinu.
Try the following code to achieve your scenario.
C#:
protected
void
RadGrid1_PdfExporting(
object
sender, Telerik.Web.UI.GridPdfExportingArgs e)
{
e.RawHTML = e.RawHTML.Replace(
"<br/>"
, Environment.NewLine);
}
Thanks,
Shinu.
0

Radha
Top achievements
Rank 1
answered on 12 Dec 2012, 02:12 PM
Hi,
Thanks for the reply but it didn't work.
Below is the code where e.RawHTML have <br/> tags and those tags are not able to read while exporting to PDF.
AS you suggested i tried the code but still the issue exists.
Thanks for the reply but it didn't work.
Below is the code where e.RawHTML have <br/> tags and those tags are not able to read while exporting to PDF.
AS you suggested i tried the code but still the issue exists.
protected void grdReport_PdfExporting(object source, GridPdfExportingArgs e)
{
e.RawHTML = "<left><img alt='test' style='height:20px;width:100px;' src='~/images/Volt.jpg'/></left><center style='font-family:Verdana;font-weight:bold'>" + exportPageTitle + "</center>" + e.RawHTML;
e.RawHTML = e.RawHTML.Replace("<br/>", Environment.NewLine);
}
Please help me how to solve the issue?
0
Hello Radha,
If you want to add a new row you have to add a <br/> tag. On the other hand if you want to add an empty space you have to add a . I prepared a small sample and attached it to this forum post. In the example I demonstrated how you can add a new row and empty spaces at the RawHTML.
Regards,
Kostadin
the Telerik team
If you want to add a new row you have to add a <br/> tag. On the other hand if you want to add an empty space you have to add a . I prepared a small sample and attached it to this forum post. In the example I demonstrated how you can add a new row and empty spaces at the RawHTML.
Regards,
Kostadin
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.