Hi,
I have a RadTreeView which has a context menu defined in the aspx page. The nodes are loaded from an xml file.
Is there any way I can enable/disable context menu items dependant on the attributes of each individual treenode? I.E. some of the nodes will be marked as uneditable so I would like to disable that item in that node's context menu.
XML Source:
TreeeView declaration:
Is there anyway I can do this or am I going to have to dynamically create a context menu for every node that requires a non-standard menu?
Cheers,
Nick
I have a RadTreeView which has a context menu defined in the aspx page. The nodes are loaded from an xml file.
Is there any way I can enable/disable context menu items dependant on the attributes of each individual treenode? I.E. some of the nodes will be marked as uneditable so I would like to disable that item in that node's context menu.
XML Source:
<Tree> | |
<Node Text="Front Page" Value="" ContextMenuID="rtvcmFrontPage"/> | |
<Node Text="Section One" Value="1" ContextMenuID="rtvcmSection" /> | |
<Node Text="Section Two" Value="2" ContextMenuID="rtvcmSection" CanDelete="False" CanEdit="False" /> | |
<Node Text="Section Three" Value="3" ContextMenuID="rtvcmSection" /> | |
<Node Text="Section Four" Value="4" ContextMenuID="rtvcmSection" CanDelete="False" /> | |
<Node Text="Section Five" Value="5" ContextMenuID="rtvcmSection" /> | |
</Tree> |
TreeeView declaration:
<telerik:RadTreeView ID="rtvSections" runat="server" | |
OnClientNodeClicked="ClientNodeClicked" | |
OnClientContextMenuItemClicking="ClientContextMenuItemClicking"> | |
<ExpandAnimation Duration="200" /> | |
<CollapseAnimation Duration="200" Type="OutQuint" /> | |
<ContextMenus> | |
<telerik:RadTreeViewContextMenu ID="rtvcmSection" runat="server"> | |
<Items> | |
<telerik:RadMenuItem Text="Insert Section"> | |
<Items> | |
<telerik:RadMenuItem Text="Before" Value="InsertSectionBefore" /> | |
<telerik:RadMenuItem Text="After" Value="InsertSectionAfter" /> | |
</Items> | |
</telerik:RadMenuItem> | |
<telerik:RadMenuItem Text="Edit Section" Value="EditSection" /> | |
<telerik:RadMenuItem Text="Delete Section" Value="DeleteSection" /> | |
<telerik:RadMenuItem IsSeparator="true" /> | |
<telerik:RadMenuItem Text="New Item" Value="NewItem" /> | |
</Items> | |
</telerik:RadTreeViewContextMenu> | |
</ContextMenus> | |
</telerik:RadTreeView> |
Is there anyway I can do this or am I going to have to dynamically create a context menu for every node that requires a non-standard menu?
Cheers,
Nick