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

[Solved] Treeview - Text display with html tags

1 Answer 25 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Ahm
Top achievements
Rank 1
Ahm asked on 13 Jul 2011, 04:00 PM
Hi,

I am using telerik treeview MVC bind model, while i am binding the childern node, the  Navigation<TreeViewItem>.Text is diplaying with the html tags.

My Code:

List<TreeViewItem> opTree = new List<TreeViewItem>();

opTree.Add(new TreeViewItem
{
    Text = getTitle(string Title),
}

private string getTitle(Title)
 {

    StringBuilder sb = new StringBuilder();

    sb.Append("<font color=#0056D7><u>");
    sb.Append(Title);
    sb.Append("</u></font>");
    sb.Append("Content");
  return sb.ToString();

}

csHtml Page - childnode binding section
.DataBinding(dataBinding => dataBinding.Ajax().Enabled(true).Select("GetChildNodes", "Toc"))

Please help me resolve this issue.

Regards
Ahmed.S

1 Answer, 1 is accepted

Sort by
0
Ahm
Top achievements
Rank 1
answered on 14 Jul 2011, 11:06 AM
It will be great if i get any feedback from Telerik Support centre or anyone in the forum who has faced this problem.  The MVC TreeView while binding the childnode, it will display with html tags.
Tags
TreeView
Asked by
Ahm
Top achievements
Rank 1
Answers by
Ahm
Top achievements
Rank 1
Share this question
or