Shortcut keys to open RadContextMenu

3 posts, 1 answers
  1. Hadrien
    Hadrien avatar
    28 posts
    Member since:
    Apr 2012

    Posted 05 Dec 2012 Link to this post

    Hi,

    I have a RadContextMenu inside a RadGridView and it works fine. So each row in RadGridView has is own RadContextMenu.
    Now I would like to add some shortcut keys in order to get a context menu open in some submenu or to "click" automatically a submenu.

    What do you suggest?

    Thanks,

  2. Rosen Vladimirov
    Admin
    Rosen Vladimirov avatar
    640 posts

    Posted 05 Dec 2012 Link to this post

    Hello,

    RadContextMenu has IsOpen property - you can use it to open or close it. I'm attaching a simple project where when you use LeftCtrl button RadContextMenu will open. Note that the focus of your application shoudl be on the item on which RadContextMenu is attached. Unfortunately there's no easy way to implement opening of submenus. Each RadMenuItem has IsSubMenuOpen property and you can use it, but there are several problems you may face. That's why I suggest you to use the approach from the attachment and use keyboard naviagtion to open the desired menu.

    Please check the attachment and inform us if you have any concerns.

    Greetings,
    Rosen Vladimirov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. UI for WPF is Visual Studio 2017 Ready
  4. Answer
    Rosen Vladimirov
    Admin
    Rosen Vladimirov avatar
    640 posts

    Posted 05 Dec 2012 Link to this post

    Hello Hadrien,

    I just want to share some more information with you. You can use access keys in RadContextMenu. To set an access key you should use the special symbol "_" in the Header of RadMenuItems. For example if your header is "_Item 1" and when RadContextMenu is opened you press the button "I" from the keyboard Item 1 will be clicked if it doesn't have subitems or its submenu will be opened if such exists. I've modified the solution from my previous post and now it uses Access key and after you open RadContextMenu with LeftCtrl you will be able to use them. You can find it attached.

    Another thing that you can use is opening RadContextMenu on specific event. More information about this can be found in our online help.

    Hopefully this helps.

    All the best,
    Rosen Vladimirov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top