Jithin Jose

Jithin Jose

  • 1.9k
  • 60
  • 2.2k

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

May 20 2016 1:11 AM

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.


Brought to you by: JavaScript SDK for Bold BI dashboard and analytics embedding. Free trial.