This question is locked. New answers and comments are not allowed.
Hi there,
I was wondering if there was a way to both bind to a model AND specify a template for additional custom layout/content for each bound node in the TreeView control. Below is a sample of some code I am currently using. As it stands now, this code is just consuming data from an IEnumerable of my model object, where each object in the list is involved in a three tier hierarchy.
I've found an example of what I want to do in another post in this forum, however the view code posted by the Telerik rep was done with razor syntax... unfortunately, I'm stuck using the regular .aspx rendering engine for this project.
I am VERY new to both MVC, and Telerik UI extensions so any help/advice would be greatly appreciated. Thanks!
I was wondering if there was a way to both bind to a model AND specify a template for additional custom layout/content for each bound node in the TreeView control. Below is a sample of some code I am currently using. As it stands now, this code is just consuming data from an IEnumerable of my model object, where each object in the list is involved in a three tier hierarchy.
<% Html.Telerik().TreeView() .Name("TreeView") .BindTo(Model, mappings => { mappings.For<TelerikFacLocUIDemo.Models.FacLocViewModel>(binding => binding .ItemDataBound((item, category) => { item.Text = category.Name; }) .Children(category => category.Children)); mappings.For<TelerikFacLocUIDemo.Models.FacLocViewModel>(binding => binding .ItemDataBound((item, product) => { item.Text = product.Name; })); }) .Render();%>I've found an example of what I want to do in another post in this forum, however the view code posted by the Telerik rep was done with razor syntax... unfortunately, I'm stuck using the regular .aspx rendering engine for this project.
I am VERY new to both MVC, and Telerik UI extensions so any help/advice would be greatly appreciated. Thanks!