Hide root node for SiteMapDataSource

2 posts, 0 answers
  1. miksh
    miksh avatar
    275 posts
    Member since:
    Nov 2006

    Posted 07 Mar 2014 Link to this post

    ASP.NET SiteMapDataSource requires to have a root node to define the navigation structure. If bind to radTreeView as is (e.g. to render a side menu) it will render the root menu item and then all other items as children. See http://demos.telerik.com/aspnet-ajax/treeview/examples/programming/declarativedatasources/defaultcs.aspx

    I wonder how to skip the root item and display everything from the level 1 to have multiple top-level nodes?
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 10 Mar 2014 in reply to miksh Link to this post

    Hi miksh,

    Please try to set the ShowStartingNode property of RadsiteMapDataSource to false to achieve your scenario.

    <telerik:RadTreeView ID="RadTreeView1" runat="server" Width="100%" DataSourceID="RadSiteMapDataSource1">
            <telerik:RadTreeNodeBinding Expanded="true"></telerik:RadTreeNodeBinding>
    <telerik:RadSiteMapDataSource runat="server" ID="RadSiteMapDataSource1" ShowStartingNode="false" SiteMapFile="~/RadMenu/Web.sitemap">

  3. DevCraft R3 2016 release webinar banner
Back to Top