This is a migrated thread and some comments may be shown as answers.

Numbering RadMenuItems

2 Answers 37 Views
Buttons, RadioButton, CheckBox, etc
This is a migrated thread and some comments may be shown as answers.
Ben
Top achievements
Rank 1
Ben asked on 08 Apr 2013, 05:55 PM

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 Answers, 1 is accepted

Sort by
0
Ivan Petrov
Telerik team
answered on 10 Apr 2013, 02:10 PM
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.
0
Ben
Top achievements
Rank 1
answered on 10 Apr 2013, 05:23 PM

Hi Ivan,

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

Kind regards,

Ben

Tags
Buttons, RadioButton, CheckBox, etc
Asked by
Ben
Top achievements
Rank 1
Answers by
Ivan Petrov
Telerik team
Ben
Top achievements
Rank 1
Share this question
or