Numbering RadMenuItems

3 posts, 0 answers
  1. Ben
    Ben avatar
    6 posts
    Member since:
    Mar 2013

    Posted 08 Apr 2013 Link to this post

    Hi there,

    I’d like to create a RadDropDownButton with the characteristics depicted in the attached screenshot. Described textually, they fall into these two categories:

    Look: The index (which should be one, rather than zero, based) of each RadMenuItem is displayed in the left column. (In the screenshot, these are numbers 1 - 3).

    Behavior: If the RadDropDownButton is expanded and its RadMenuItems thus visible, typing 1,2 3, etc will result in the click event of the corresponding  RadMenuItem being called.  For example, looking at the screenshot, typing “2” would cause the “Update Across” click handler to be called.

    Would you please suggest the best way of accomplishing this? Any guidance would be quite appreciated!

  2. Ivan Petrov
    Admin
    Ivan Petrov avatar
    701 posts

    Posted 10 Apr 2013 Link to this post

    Hi Ben,

    Thank you for writing.

    I have attached an example project where I have implemented your scenario using our RadShortcuts. I have implemented a shortcut provider which handles the F1 key and all number keys. The example takes advantage of the fact that the enum values have a numerical value and there are some arithmetical operations with the Keys enumeration. I have also implemented a custom menu item that would display a number in the left hand side column.

    I hope this will be useful. Should you have further questions, I would be glad to help.

    Kind regards,
    Ivan Petrov
    the Telerik team
    WinForms Q1 2013 boasts PivotGrid, PDF Viewer, Chart enhancements and more. Check out all of the latest highlights.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Ben
    Ben avatar
    6 posts
    Member since:
    Mar 2013

    Posted 10 Apr 2013 Link to this post

    Hi Ivan,

    Your example works beautifully, and is extremely helpful. Thank you so much – I really, really, appreciate your help!

    Kind regards,

    Ben

Back to Top