TreeView / Context Menu Sub-Menus

4 posts, 0 answers
  1. Love
    Love avatar
    2 posts
    Member since:
    Sep 2013

    Posted 11 Sep 2013 Link to this post

    Hello,

    I tried to look around here on the forum and searching Google without any luck. I would like to create Sub-Menus in the Treeview Menu and the Context Menu. I need two main menu choices on right click and each of them with five sub-menus. Is this possible and how do you implement this?

    Best Regards
    Love Lundquist
  2. Dobromir
    Admin
    Dobromir avatar
    1633 posts

    Posted 11 Sep 2013 Link to this post

    Hello,

    Please take a look at the following help article
    http://www.telerik.com/help/aspnet-ajax/fileexplorer-add-custom-button-context-menu-item.html
    I believe it will be of help achieving the required result.

    Regards,
    Dobromir
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Love
    Love avatar
    2 posts
    Member since:
    Sep 2013

    Posted 11 Sep 2013 Link to this post

    Thanks Dobromir,

    the method...
     //context menu item
            RadMenuItem customMenuOption = new RadMenuItem("custom");
            customMenuOption.Value = "custom_Menu";
            RadFileExplorer1.TreeView.ContextMenus[0].Items.Add(customMenuOption);

    ...just give me the option to add a Main Menu Item in the Context Menu. I would like to add a Sub-Menu to my Main Menu. How would you achieve this? I am unfortunately not the experienced programmer but learning.

    Thanks,
    L
  5. Dobromir
    Admin
    Dobromir avatar
    1633 posts

    Posted 12 Sep 2013 Link to this post

    Hello,

    You can add sub-items to the new custom menu item by adding these sub-items to the Items collection of the menu Item, e.g.:
    RadMenuItem menuItem = new RadMenuItem("test");
    RadMenuItem subMenuItem = new RadMenuItem("test_sub");
    menuItem.Items.Add(subMenuItem);
    explorer.TreeView.ContextMenus[0].Items.Add(menuItem);

    I hope this helps.

    Regards,
    Dobromir
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Back to Top