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

TreeView with HTML tags

1 Answer 144 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Abhijeet
Top achievements
Rank 1
Abhijeet asked on 06 Jul 2015, 05:06 PM

Hi,

 

I am really new to the Kendo UI Controls and thinking to integrate it in my web application.

The issue I am facing is binding the Treeview with the HTML tags as my dataTextField.

 

My controller is returning me List of strings, which I use for binding as JSON data to my VIEW.

The list of string contains string as below

"<span id='spn1' style=' font-weight: bold;'>text1</span> <a href='someFunction()'>text2</a> text3"

So, my Tree-node should display me output as :

text1 text2 text3

 

Instead of this, it displays my tree as-is with HTML tags. like above string.

So, What really concern is, is it possible to achieve my target? And if yes, What is the solution on this?

 

1 Answer, 1 is accepted

Sort by
0
Alexander Popov
Telerik team
answered on 08 Jul 2015, 11:23 AM
Hi Abhijeet,

This behavior is expected, because the text field is not encoded as HTML. The simplest workaround would be to use a template, as shown here.

Regards,
Alexander Popov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
TreeView
Asked by
Abhijeet
Top achievements
Rank 1
Answers by
Alexander Popov
Telerik team
Share this question
or