Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to lock combobox for typing

Tags:

c#

devexpress

I use DevExpress 2.4 and I have a combobox which is bound to a row in a propertygrid control. I want to disable this combobox for editing it content by keyboard and be able only to choose the value by clicking with the mouse. I read on the internet just to change the DropDownStyle property to DropDownList, instead of DropDown but when I go to the combobox in properties I don't have property DropDownList and only DropDownItemHeight and DropDownRows... So how to disable typing in this combobox?

like image 310
Dominating Avatar asked Mar 08 '11 10:03

Dominating


3 Answers

Open property editor for this GridControl and open repository, now in options of this ComboBox go down to TextEditStyle and choose DisableTextEditor as option.

like image 142
NT88 Avatar answered Sep 25 '22 21:09

NT88


Just do this: this.comboBoxType.DropDownStyle = ComboBoxStyle.DropDownList;

like image 26
giorgos Avatar answered Sep 24 '22 21:09

giorgos


How about using the LookupEdit control?

like image 43
Tom Avatar answered Sep 25 '22 21:09

Tom