How to Disable or enable Items in Rad Menu based on TreeView Node Value

5 posts, 0 answers
  1. Bob
    Bob avatar
    55 posts
    Member since:
    Apr 2008

    Posted 29 Sep 2008 Link to this post

    Is it possible to have a different context menu for a tree based on the node name?

    I currently have server side code that creates the tree and then applies a menu, like so:

    m_RadTreeFolderHierarchy.ContextMenus.Add(

    New RadTreeViewContextMenu())

    m_RadTreeFolderHierarchy.ContextMenus(0).LoadContentFile(

    "~/TreeSupport/TreeMenu.xml")


    How would I change the menu for one node, and keep the default for the rest?

  2. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 29 Sep 2008 Link to this post

    Hello Bob,

    You can check this help topic.

    Regards,
    Albert
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Bob
    Bob avatar
    55 posts
    Member since:
    Apr 2008

    Posted 29 Sep 2008 Link to this post

    That post was not relavant.  I am already hadling the events.  My question was:
    "Is it possible to have a different context menu for a tree based on the node name?"

    Stated differently:

    I would like the context menu for node a show the following options:
    •     Refresh my item list

    For all other nodes, I would like the context menu options:

    • Move Up
    • Move Down
    • Delete
  5. Bob
    Bob avatar
    55 posts
    Member since:
    Apr 2008

    Posted 29 Sep 2008 Link to this post

    Or... Can the tree xml definition containg contextmenu definitions at each level?
  6. Bob
    Bob avatar
    55 posts
    Member since:
    Apr 2008

    Posted 29 Sep 2008 Link to this post

    Found the solution:   ContextMenuID= can be changed at runtime, or added to each node.

    When I create the default menu, I also create additional and assign them either in code, or in the xml for the tree.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017