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

PDF Export error w/ "<" and ">" in data

3 Answers 145 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 1
Robert asked on 04 Jun 2009, 01:29 PM
I get an error on export if the data contains "<" or ">" b/c it thinks its part of the XML when it is exporting to PDF.  When I replace these characters it messes up the RadGrid.  Is there a solution to this?  Thanks.

3 Answers, 1 is accepted

Sort by
0
Accepted
Daniel
Telerik team
answered on 07 Jun 2009, 07:34 PM
Hello Robert,

As you properly noticed, you can't use such unescaped symbols because this will result in broken output (XHTML compliance should be observed). A possible approach in this case would be to use the Server.HtmlEncode method.

Best regards,
Daniel
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Robert
Top achievements
Rank 1
answered on 08 Jun 2009, 01:24 PM
I tried that in my code already and the GridEditCommandColumn buttons are replaced w/ &nbsp;  
0
Daniel
Telerik team
answered on 12 Jun 2009, 12:16 PM
Hello Robert,

In this case you may use the HtmlEncode property of GridBoundColumn:
<telerik:GridBoundColumn HtmlEncode="true" ... 

Best regards,
Daniel
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
Robert
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Robert
Top achievements
Rank 1
Share this question
or