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

RadTreeView + RadContextMenu Disabled Item Issue

3 Answers 81 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
digitall
Top achievements
Rank 1
digitall asked on 19 Aug 2008, 02:06 AM
I have a scenario similar to your example here:

http://www.telerik.com/DEMOS/ASPNET/Prometheus/Treeview/Examples/Functionality/ContextMenu/DefaultCS.aspx

I have a specific context menu being used on the root element and a different one for all child elements (there will always only be one root). The context menu item seems to always be disabled on the root one (just like in the demo) and I need to get it enabled somehow.

Any suggestions?

3 Answers, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 20 Aug 2008, 02:12 PM
Hello,

You can find attached a sample project demonstrating the needed approach. Please download it and give it a try.

Regards,
Yana
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
digitall
Top achievements
Rank 1
answered on 20 Aug 2008, 07:15 PM
I'm not sure I follow. I see the project works as expected, but I can't say I understand why..?
0
Yana
Telerik team
answered on 22 Aug 2008, 07:19 AM
Hello,

In the client-side 'formatMenuItem' function, which is called when OnClientContextMenuShowing event is fired for the menu items with text 'Copy' and 'Rename', the value of the node is checked and if it contains the string  '_Private_'  these menu items are disabled. So you decide for which nodes of the tree to disable the context menu items by setting their Value property.

Best wishes,
Yana
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
TreeView
Asked by
digitall
Top achievements
Rank 1
Answers by
Yana
Telerik team
digitall
Top achievements
Rank 1
Share this question
or