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

Treeview Enable/Disable HTML encoding at node level

2 Answers 223 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Charles
Top achievements
Rank 1
Charles asked on 09 Feb 2016, 07:47 PM

In general, I want a treeview I have to disable html encoding (enablenodetexthtmlencoding="false"). It looks great and lets me style the nodes accordingly. In some circumstances, I want to allow nodes to have < in their names, which causes issues with the encoding:

Examples:

CIR<CLE turns into CIR<cle< span=""/>

CIRCLE<E> turns into CIR <e/>

both of which display as HTML.

Is there any property or method to get these names to display, as needed, at the node level which will override the property set at the radtreeview?

2 Answers, 1 is accepted

Sort by
0
Accepted
Nencho
Telerik team
answered on 12 Feb 2016, 04:01 PM
Hello Charles,

For such scenarios where you need to have certain html embedded in the nodes declaration, we suggest the usage of Templates. Please refer to the following documentation, providing delated informatino on the Server and Client templates available with the RadTreeView:

http://docs.telerik.com/devtools/aspnet-ajax/controls/treeview/templates/overview

Hope this would help.

Regards,
Nencho
Telerik
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 Feedback Portal and vote to affect the priority of the items
0
Charles
Top achievements
Rank 1
answered on 12 Feb 2016, 07:06 PM
Thanks Nencho. I tried out the client templates (http://docs.telerik.com/devtools/aspnet-ajax/controls/treeview/templates/client-templates) and they worked perfectly.
Tags
TreeView
Asked by
Charles
Top achievements
Rank 1
Answers by
Nencho
Telerik team
Charles
Top achievements
Rank 1
Share this question
or