RadTreeView + RadContextMenu Disabled Item Issue

4 posts, 0 answers
  1. digitall
    digitall avatar
    169 posts
    Member since:
    Jun 2006

    Posted 18 Aug 2008 Link to this post

    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?
  2. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 20 Aug 2008 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. digitall
    digitall avatar
    169 posts
    Member since:
    Jun 2006

    Posted 20 Aug 2008 Link to this post

    I'm not sure I follow. I see the project works as expected, but I can't say I understand why..?
  5. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 22 Aug 2008 Link to this post

    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.
Back to Top