SelectedValue of Combox Not saved in the table
Visual Basic
1
Posts
1
Posters
0
Views
1
Watching
-
Hi In my data entry form, all the fields are bound to a tblStaff table through BindingSource (_staffInfoB_S). One of these controls is a cboGender ComboBox. I am manually populating the cboGender with only two items -- "Male" and "Female" and trying the SelectedValue to be saved in the underlying table, using the following code:
cboGender.Items.Add("Male")
cboGender.Items.Add("Female")
Dim bndg As New System.Windows.Forms.Binding _
("SelectedValue", StaffInfoBindingSource, "Gender", True)
cboGender.DataBindings.Add(bndg)But, it doesn't save the SelectedValue in the underlying table. Looking for a suggestion, please!