This question is locked. New answers and comments are not allowed.
Hello,
I have seen in the documentation that I can add an action for a item in a treeview like this:
I have seen in the documentation that I can add an action for a item in a treeview like this:
<%= Html.Telerik().TreeView().Name("TreeView2").Items(item =>{item.Add().Text("User Informationen").ImageUrl("~/Content/TreeView/FirstLook/contacts.gif").ImageHtmlAttributes(new { alt = "User" }).Action("Index", "Home");;})
Now I have a custom binding for my Treeview that looks like:<%= Html.Telerik().TreeView().Name("TreeView").BindTo(ViewData["TreeViewEntries"] as List<TreeViewItem>, mappings =>{mappings.For<TreeViewItem>(binding => binding.ItemDataBound((item, treeViewItem) =>{item.Text = treeViewItem.Text;item.Value = treeViewItem.Value;item.Url = treeViewItem.Url;}).Children(treeViewItem => treeViewItem.Items));})%>
How can I apply for every single item a action that is fired when the users clicks the element?
Thank you