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

Html in node's text - Q1 2012

8 Answers 111 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Raphaël MANSUY
Top achievements
Rank 1
Raphaël MANSUY asked on 15 Feb 2012, 11:23 PM
I've just installed Q1 2012 and I have a display problem with my treeviews. The html in node's text is displayed as is (see screenshot).
I generate the treeviews in code:

...
var title = String.Format(
"Unclassified <span style='font-size:9px'>({0})</span>", nb);
RadTreeNode unclassified = new RadTreeNode(title, "-2");
...

What is the fastest fix?

8 Answers, 1 is accepted

Sort by
0
Bozhidar
Telerik team
answered on 16 Feb 2012, 11:55 AM
Hello,

Yes, since the Beta release of Q1 2012 the text of RadTreeNode is html encoded, since we had some issues previously with dangerous requests errors when using Load on Demand through web service or serverside callback.

One possible workaround to this is to go through the nodes in the OnClientLoad event and set their innerHTML directly. Here's how you can do that:
function clientLoad(sender) {
    var nodes = sender.get_allNodes();
    for (var i = 0; i < nodes.length; i++) {
        nodes[i].get_textElement().innerHTML = nodes[i].get_text();
    }
}
 
Regards,
Bozhidar
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Raphaël MANSUY
Top achievements
Rank 1
answered on 16 Feb 2012, 05:43 PM
It works, thanks!
0
Bozhidar
Telerik team
answered on 17 Feb 2012, 10:27 AM
Hello,

An update on the subject. Please see the following forum topic:
http://www.telerik.com/community/forums/aspnet-ajax/treeview/known-issues-and-breaking-changes.aspx 
 
All the best,
Bozhidar
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Ed
Top achievements
Rank 1
answered on 27 Feb 2012, 05:52 PM
Hi there,

I have tried setting the EnableNodeTextHtmlEncoding property to false as per the forum topic but it has made no difference: the HTML in the text of my nodes is still encoded.  In fact, Visual Studio 2010 doesn't recognise EnableNodeTextHtmlEncoding as a property of the RadTreeView.

Am I doing something wrong?  I am using version 2012.1.215.40.

Thanks,

Ed Graham
0
Bozhidar
Telerik team
answered on 27 Feb 2012, 05:58 PM
Hi Ed,

Thank you for getting back to us.

The property isn't included in the official Q1 release. To get it, you have to upgrade to the latest internal build. You can see how to do that in the following link:
http://www.telerik.com/support/kb/aspnet-ajax/general/updating-radcontrols-for-asp-net-to-another-version-or-license.aspx 
 
Greetings,
Bozhidar
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.
0
Ed
Top achievements
Rank 1
answered on 28 Feb 2012, 11:49 AM
Dear Bozhidar,

Thank you for your speedy reply.  I have looked in our account but cannot see any available internal builds -- please see the attached screenshot for information.

Best wishes,

Ed Graham
0
Bozhidar
Telerik team
answered on 29 Feb 2012, 09:49 AM
Hello Ed,

Thank you for getting back to us.

Please excuse us for the misunderstanding. Due to some internal reasons, the uploading of the internal build was slightly delayed. However now it's available for download.
 
Greetings,
Bozhidar
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.
0
Ed
Top achievements
Rank 1
answered on 01 Mar 2012, 12:41 AM
Thanks -- it's working now.
Tags
TreeView
Asked by
Raphaël MANSUY
Top achievements
Rank 1
Answers by
Bozhidar
Telerik team
Raphaël MANSUY
Top achievements
Rank 1
Ed
Top achievements
Rank 1
Share this question
or