RadMenu Add Child Menu Item to Parent Menu Item

2 posts, 0 answers
  1. Joe
    Joe avatar
    4 posts
    Member since:
    Apr 2014

    Posted 12 Aug 2015 Link to this post


     I have been using the Client Side API and also looking all over the internets for a solution to this problem and have not seen a thing.

     I have a RadMenu that is created dynamically server side. This menu can have as many menu items as the user defines. I would like to add a child menu item to a parent menu item via Telerik's Client Side API. 

    The Add and Insert functions both seem to add the item to the menu as a parent instead of adding the child item inside of the parent menu item. Is there a way I can add the child item to the parent item, so that it displays within the parent items drop down? Ultimately, I would like to create a multilevel drop down.

     Here is some test code I have written, to see if this is possible.Thanks!


        function AddMenuItems() {
                var menu = $find("<%= testMenu.ClientID %>")

                var parentItem = new Telerik.Web.UI.RadMenuItem();


                var childItem = new Telerik.Web.UI.RadMenuItem();
                menu.get_items().insert((menu.get_allItems().length), childItem); <== Adds the item after the parent item instead of inside. 

        <AxnMenus:AxnMenu ID="testMenu" runat="server" OnClientLoad="AddMenuItems">
            <AxnMenus:AxnMenuItem Text="item 1" runat="server"/>
            <AxnMenus:AxnMenuItem Text="item 2" runat="server"/>
            <AxnMenus:AxnMenuItem Text="item 3" runat="server"/>
            <AxnMenus:AxnMenuItem Text="item 4" runat="server"/>
            <AxnMenus:AxnMenuItem Text="item 5" runat="server"/>
            <AxnMenus:AxnMenuItem Text="item 6" runat="server"/>
            <AxnMenus:AxnMenuItem Text="item 7" runat="server"/>
            <AxnMenus:AxnMenuItem Text="item 8" runat="server"/>
            <AxnMenus:AxnMenuItem Text="item 9" runat="server"/>
            <AxnMenus:AxnMenuItem Text="item 10" runat="server"/>
            <AxnMenus:AxnMenuItem Text="item 11" runat="server"/>
            <AxnMenus:AxnMenuItem Text="item 12" runat="server"/>
            <AxnMenus:AxnMenuItem Text="item 13" runat="server"/>


  2. Ivan Danchev
    Ivan Danchev avatar
    788 posts

    Posted 13 Aug 2015 Link to this post


    I answered your question in this thread. If you have more questions I suggest we continue the discussion in it in order to avoid thread duplication.

    Ivan Danchev
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. DevCraft R3 2016 release webinar banner
Back to Top