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

HtmlEncode detail section

2 Answers 177 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Vik
Top achievements
Rank 1
Vik asked on 20 Jul 2010, 08:33 AM
Hi guys,
When data in report detail section contains a html tags, in WebViewer those are rendered as browser renders html (instead of <b>aa</b> you can see aa in bold). When I click export to excel, all is ok.

Now I added to the report event OnItemBound where texboxes are HtmlEncoded, so in WebViewer all is fine (htm tags are displayed as string) but at the same time export is performed with HtmlEncoded data so in excel you can see htmlEncoded text.

I suppose there is a simple way how to deal with this but cant find any solution.
I use Reporting Q1 2010, in detail section I have Textboxes.

Could you please give me some ideas how to solve this?
Thanks a lot.
Viktor

2 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 23 Jul 2010, 09:52 AM
Hi Viktor,

You have probably used the TextBox item instead of the HtmlTextBox item. Let's elaborate a bit on the second: the idea of the HtmlTextBox item is to allow report developers to use sections of formatted text in the report. More info on the item and a list of currently supported tags and style properties you may find in the HtmlTextBox help article. To correctly render encoded HTML our suggestion is to use the HTMLTextBox item that can handle encoded html automatically.

Check out the attached sample project that illustrates the difference between the TextBox and HTMLTextBox in handling encoded HTML.

Kind regards,
Peter
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
0
Vik
Top achievements
Rank 1
answered on 24 Jul 2010, 09:21 PM
Hi Peter,
Thanks for the answer.

Viktor
Tags
General Discussions
Asked by
Vik
Top achievements
Rank 1
Answers by
Peter
Telerik team
Vik
Top achievements
Rank 1
Share this question
or