Hello.
How can i set a default value for a combobox ?
i.e when form loads it be on it's default value.
* : I changed DropDownStyle property to DropDownList
Thank you :-)
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jaish MathewsPosted Aug 8, 2010, 8:01 AM
You can use the SelectedIndex property for that
private void Form1_Load(object sender, EventArgs e)
{
string[] numbers = {"One","Two","Three","Select a Number" };
comboBox1.DataSource = numbers;
comboBox1.SelectedIndex = 3;
}