I am using the RadTreeView in a asp.net form. I am trying to implement the ContextMenu on each node. The problem that I am having is that the ContextMenu does not display on right click
In my .ascx I define my RadTreeView and menu like this:
<telerik:RadTreeView ID="RadTreeView1" runat="server" EnableDragAndDrop="True" OnNodeDrop="RadTreeView1_NodeDrop"
In my code behind, after I dynamically populate the RadtreeView, I try to attach the ContextMenu as follows. This is the last thing done in my Code behind:
Everything works except that the ContextMenu does not display when I right click an item.
In my .ascx I define my RadTreeView and menu like this:
<telerik:RadTreeView ID="RadTreeView1" runat="server" EnableDragAndDrop="True" OnNodeDrop="RadTreeView1_NodeDrop"
OnNodeClick="RadTreeView1_NodeClick" OnContextMenuItemClick="RadTreeView1_ContextMenuItemClick" AllowNodeEditing="true" OnNodeDataBound="RadTreeView1_NodeDataBound"> <ContextMenus> <telerik:RadTreeViewContextMenu runat="server" ID="AssetMenu" ClickToOpen="True" Skin="Vista"> <Items> <telerik:RadMenuItem Text="Select Asset" Value="Select"> </telerik:RadMenuItem> <telerik:RadMenuItem Text="View Hierarchy" Value="View"> </telerik:RadMenuItem> </Items> </telerik:RadTreeViewContextMenu> </ContextMenus> </telerik:RadTreeView>
In my code behind, after I dynamically populate the RadtreeView, I try to attach the ContextMenu as follows. This is the last thing done in my Code behind:
foreach (RadTreeNode node in RadTreeView1.GetAllNodes()) { node.ContextMenuID = "AssetMenu"; node.EnableContextMenu = true; }
Everything works except that the ContextMenu does not display when I right click an item.