0
Answer

How to prevent closing of combo box when an item is selected

Jithin Jose

Jithin Jose

8y
347
1

0down votefavorite

I have a ComboBox like the following and would like to prevent it closing when I click the header section (e.g. Administrators).

enter image description here

I just tried the following code.

private void cmboName_SelectedIndexChanged(object sender, EventArgs e) { if (cmboName.SelectedIndex == 1) {             cmboName.DroppedDown = true; return; } }

But there is a shivering happens; first combo box will be closed and then opens.