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

TreeView / Context Menu Sub-Menus

3 Answers 37 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
Love
Top achievements
Rank 1
Love asked on 11 Sep 2013, 08:37 AM
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

3 Answers, 1 is accepted

Sort by
0
Dobromir
Telerik team
answered on 11 Sep 2013, 11:10 AM
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.
0
Love
Top achievements
Rank 1
answered on 11 Sep 2013, 11:21 AM
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
0
Dobromir
Telerik team
answered on 12 Sep 2013, 08:18 AM
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.
Tags
FileExplorer
Asked by
Love
Top achievements
Rank 1
Answers by
Dobromir
Telerik team
Love
Top achievements
Rank 1
Share this question
or