Dynamically setting ComboBox selected index in Windows Forms application

Last Reply on Jun 23, 2012 01:26 AM By Mudassar

Posted on Jun 23, 2012 01:26 AM

i have created a dropdown list dynamically in which data is coming through database

suppose there are three records in that list and i want a new one so there i put <new>  keyword

now if user select this new keyword another form should open how to set selected index value of dropdown whcih is created dynamically.

Posted on Jun 23, 2012 01:26 AM

This way

comboBox1.SelectedIndex = 2;