I’m creating a Combobox dynamicly at run time, however, I don’t’ know how to set the default selected value for it!!? Thanks.
Dim MyComboBox As New ComboBox
MyComboBox.Name = “MyComboBox”
MyComboBox.DataSource = MyDefaultView
MyComboBox.DisplayMember = "ItemList"
MyComboBox.ValueMember = "ValueList"
----This line has NO effect on MyComboBox!!! ----
MyComboBox.SelectedValue = 6
MyComboBox.Location = New Point(80, 60)
Me.Controls.Add(MyComboBox)
Dim MyComboBox As New ComboBox
MyComboBox.Name = “MyComboBox”
MyComboBox.DataSource = MyDefaultView
MyComboBox.DisplayMember = "ItemList"
MyComboBox.ValueMember = "ValueList"
----This line has NO effect on MyComboBox!!! ----
MyComboBox.SelectedValue = 6
MyComboBox.Location = New Point(80, 60)
Me.Controls.Add(MyComboBox)