We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

how do i set a initial value of a combobox from a list of values of a combo box

hi all, I'm adding some elements to a combo box and I want to set one of its value as a initial value. I wrote the following code, but it is not setting '2' as initial value.Is it correct or not ? Is theie any solution to this ? cmb1.Items.Add ( "1" ); cmb1.Items.Add ( "2" ); cmb1.Items.Add ( "3" ); cmb1.Items.Add ( "4" ); strselval = "2"; cmb1.Text = strselval; regards. lat

Loader.
Live Chat Icon For mobile
Up arrow icon