More in this section

Forums / Developing with Sitefinity / sitemapdatasource - menu question

sitemapdatasource - menu question

2 posts, 0 answered
  1. Chris
    Chris avatar
    6 posts
    18 Jun 2007
    16 Sep 2008
    Link to this post

    I have a menu bound to the sitemapdatasource. I'd like to add an external link to the menu in one of the submenus(dropdown).  is there a way to do this?

  2. Pepi
    Pepi avatar
    981 posts
    31 Jan 2017
    19 Sep 2008
    Link to this post
    Hello Alex,

    I would suggest you add the item programatically in the handler of OnItemDataBound event like this:

    <asp:SiteMapDataSource ID="SitemapDataSource1" runat="server" ShowStartingNode="false" /> 
    <telerik:RadMenu ID="RadMenu1" runat="server" DataSourceID="SitemapDataSource1" OnItemDataBound="RadMenu1_ItemDataBound">   

    public void RadMenu1_ItemDataBound(object sender, RadMenuEventArgs e) 
            if (e.Item.Text == "Home"
                RadMenuItem NewItem = new RadMenuItem(); 
                NewItem.Text = "Telerik"
                NewItem.NavigateUrl = ""
                //Adds the item to the Items collection of the parent item 

    Please note that the example above is for RadMenu for ASP.NET AJAX and not for classic RadMenu.

    Do let us know if you need any further assistance.

    Kind regards,
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
2 posts, 0 answered