Reputation: 306
What i wanted is after binding combobox, the first item ( first item will be always header like 'Select Item') need to be in selected style, means the blue back color and typing will overwrite that item (autocomplete starts then).
dropdownstyle is dropdown so that user can type inside combobox.
Wanted like this
Upvotes: 0
Views: 290
Reputation: 11
There are two methods :
comboBox1.Focus();
or
comboBox1.select(0, comboBox1.text.Length);
Upvotes: 0
Reputation: 337
When the combobox gets focus the text will be selected automatically.
If you want the combobox to get focus right after the binding you can use
ComboBox1.DataSource = oDataSource
ComboBox1.Focus()
Upvotes: 2