1

I am using Telerik treeview in MVC3 Razor view to display tree structured information. I would like to Add a set of Buttons/Links (Edit,Create,Details) to each node in the tree. I tried the following but the actionlink does not get displayed.The model is a List

     @(Html.Telerik().TreeView()
    .Name("my-treeview")
    .BindTo(Model, (currentItem,  tree) =>
    {
        currentItem.Text = tree.Name;
        currentItem.Encoded = false;
        currentItem.Expanded = true;
        currentItem.Value = tree.val;
        currentItem.Enabled = true;
        currentItem.Template.InlineTemplate =
                           @<text>

                                 @Ajax.ActionLink("Test", "Test", new AjaxOptions { UpdateTargetId = "testid" });
                           </text>;
    }
josephj1989
  • 9,509
  • 9
  • 48
  • 70

1 Answers1

1

This won't work indeed. Set the Text property to the required HTML value. And make sure Encoded is set to false.

Atanas Korchev
  • 30,562
  • 8
  • 59
  • 93