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

Delete value in ComboBox

1 Answer 76 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Murray
Top achievements
Rank 2
Murray asked on 01 Sep 2010, 02:16 PM
Hi

I have set our ComboBoxes to ReadOnly as we don't want users entering foreign values. We also need the ability to clear a selected value with the Delete key. I have seen other threads on this, with the response saying to use the "Clear Selection" button.

As our forms are mainly used by Data Entry clerks, they are keyboard driven users. What they need is to be able to tab from field to field and quickly delete existing values. This should be achieved with the Del or Backspace key. Having to switch to a mouse or arrow down to a Clear Selection button adds too many actions to what should be a simple work flow.

Is there a possibility to attach the "Clear Selection" function to the users Del key?

Regards
Murray Eaton

1 Answer, 1 is accepted

Sort by
0
Konstantina
Telerik team
answered on 02 Sep 2010, 08:42 AM
Hello Murray,

Thank you for contacting us.

You can handle the KeyDown event of the ComboBox and clear the value if it is a Delete key, for example:

private void radComboBox_KeyDown(object sender, KeyEventArgs e) 
       
           if(e.Key == Key.Delete) 
           
               (sender as RadComboBox).SelectedItem = null
           
       }

Hope this helps. If you have any other questions please let us know.

Greetings,

Konstantina
the Telerik team

 

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
ComboBox
Asked by
Murray
Top achievements
Rank 2
Answers by
Konstantina
Telerik team
Share this question
or