This question is locked. New answers and comments are not allowed.
Is there a way to load a child nodes children on demand? The http://demos.telerik.com/aspnet-mvc/razor/treeview/ajaxloading doesnt help me because its loading the first node on demand and also all of that nodes children. The last sibling is the only node I want to load on demand
Here is my current code that works. The code is commented with the changes I would like to make but cant figure out how to.
@(Html.Telerik().TreeView() .Name("ImageDetailTreeView") .BindTo(Model.OrderDetails, mappings => { //bind initial order data mappings.For<ImageViewer.Models.UI.UIModelImageDetail.OrderDetail>(binding => binding .ItemDataBound((item, order) => { item.Text = "Order Number: " + order.OrderNumber; }) .Children(cat => cat.Categories)); mappings.For<ImageViewer.Models.UI.UIModelImageDetail.CategoryDetail>(binding => binding .ItemDataBound((item, cat) => { item.Text = "Category: " + cat.Category; }) .Children(tsk => tsk.Tasks)); mappings.For<ImageViewer.Models.UI.UIModelImageDetail.TaskDetail>(binding => binding .ItemDataBound((item, tsk) => { item.Text = "Task: " + tsk.TaskName; //I want this nodes children to load on deman item.LoadOnDemand = true; }) .Children(img => img.ImageDetails)); //I would like to load this content on demand. I cant seem to figure out how to use the BindTo mappings.For<ImageViewer.Models.UI.UIModelImageDetail.ImageDetail>(binding => binding .ItemDataBound((item, img) => { item.Text = "Image Id: " + img.Id + " Scan Date: " + img.ScanDate; }) ); }) )Thanks,
Adam