Menu item set disable client side

3 posts, 1 answers
  1. Pic
    Pic avatar
    8 posts
    Member since:
    Jan 2012

    Posted 04 Feb 2012 Link to this post

    Hi guys,

    I am talking about contextmenu. I am trying to make a MenuItem not visible.
    Let's say a user right-click on a button, a ContextMenu appear and give him some choises.
    I have a javascript code that will determine what options (MenuItem) will be available for him.
    I have managed to enable/disable the menuitems following this library but I can't figure out how to make the MenuItem not visible (rather than disabled).

    Thanks in advance.
  2. Answer
    Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 05 Feb 2012 Link to this post

    Hello,

    Try with set_visible() method.
    JS:
    sender.set_visible(false); // for menu
    args.get_item().set_visible(false); // for a menu item

    Thanks,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Pic
    Pic avatar
    8 posts
    Member since:
    Jan 2012

    Posted 06 Feb 2012 Link to this post

    Thanks a lot Princy
Back to Top