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

[Solved] Treeview only showing first two levels when binding to MVCSitemap

1 Answer 98 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.
darenkov
Top achievements
Rank 1
darenkov asked on 31 Mar 2011, 01:54 AM
My treeview is only showing the first two levels when binding to the MVCSitemap. I use similar code for the MVC menu and it shows all levels but in this instance only the parent and child:

<%
                 
           Html.Telerik().TreeView()
            .Name("TreeView")
            .ExpandAll(true)
            .ShowLines(true)             
            .BindTo(Html.MvcSiteMap().Provider.RootNode.ChildNodes,                   
                            mappings => mappings.For<MvcSiteMapNode>(binding => binding                                       
                                            .ItemDataBound((item,node) =>
                                                {  
                                                    item.Text = node.Title;
                                                    item.ActionName = node.Action;
                                                    item.ControllerName = node.Controller;                                                       
                                                })
                                            .Children(node => node.ChildNodes)))                                           
           .Render();
 
 
     %>

1 Answer, 1 is accepted

Sort by
0
Sysdata Labs
Top achievements
Rank 1
answered on 17 Apr 2011, 03:43 AM
@darenkov, hope someone answers this one ... having the same issue.
Tags
TreeView
Asked by
darenkov
Top achievements
Rank 1
Answers by
Sysdata Labs
Top achievements
Rank 1
Share this question
or