Click here to Skip to main content
15,915,611 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
Hello,

what is the method to set a c# combobox item to selected state
plz help
thanks
Posted

There are several: try
comboBox1.SelectedIndex = 1;

See here : SelectedIndex[^]
There is also SelectedItem [^]and SelectedText[^]
 
Share this answer
 
You should consider a number of things:

1 - buy a basic C# book and read it
2 - learn how to use google and read MSDN
3 - start using the intellisense in the IDE to explore objects you're not familiar with.

The SelectedItem property can be set in code.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900