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

Open and select value of dropdown box with keyboard

1 Answer 249 Views
Spreadsheet
This is a migrated thread and some comments may be shown as answers.
Kurt
Top achievements
Rank 1
Kurt asked on 21 Sep 2020, 10:13 AM

I'm using the spreadsheet component for completing a template file. Several columns have dropdown box values to ensure known values.
Until now I was only able to use the mouse for opening a dropdown box + selecting a value.
The users asked me if there is also a keyboard shortcut way of opening the dropdown box and selecting a value for speeding up the data entry.

1 Answer, 1 is accepted

Sort by
0
Peter Milchev
Telerik team
answered on 24 Sep 2020, 08:50 AM

Hello Kurt,

The current implementation of the built-in editors does not feature keyboard navigation. Even if the DropDown editor is forcefully focused, the internal implementation does not allow such customization at this time. This is the case, as the StaticList that is being used does not have a keydown event handler.

Taking the above in mind, in order to apply custom keyboard navigation logic, a custom implementation would be required. Here are some tips if you decide to pursue such an implementation:

  1. Create a custom cell editor with a dropdownlist.
  2. Attach a keydown event handler to it, so that the control can be focused.
  3. Upon opening the dropdown, blur the Spreadsheet. This is needed because otherwise the Spreadsheet will steal the focus.
  4. Focus the dropdown.
  5. Upon closing the dropdown focus the next Spreadsheet cell.

You might find the below resource useful to get you started with creating a custom cell editor:

Regards,
Peter Milchev
Progress Telerik

Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive, special prizes, and more, for FREE?! Register now for DevReach 2.0(20).

Tags
Spreadsheet
Asked by
Kurt
Top achievements
Rank 1
Answers by
Peter Milchev
Telerik team
Share this question
or