I have a combobox that I use databinding on.
d, "EmploymentCondition", True))
The problem is not if there are any data in the DB that matches the values in the combobox it's when it dosen't. If the data dosen't match any of the texts that's in the combobox it keeps the parent value.
So if I "send" "Test1" to the cbo it shows "Test1" if this text is in the combobox.
If I then "send" "Test2" and that text dosen't exist in the cbo it will still show the text "Test1".
If the text is missing I what the box to show a empty row (no text).
Is this possible to fix this?
I found this, but I can't get it to work
/* Create a new Customer */
Customer cust = new Customer("Joe", null);
/* Add null value */
DataRow row = statesTable.NewRow();
/* Enter a null row (ComboBox will show blank) */
row["Name"] = "";
row["Code"] = DBNull.Value;
/* Add the row to DataTable */
/* Bind the States ComboBox to the states DataTable */
this.statesCB.DisplayMember = "Name";
this.statesCB.ValueMember = "Code";
this.statesCB.DataSource = statesTable;
/* Bind the ComboBox SelectedValue to the customer */
/* business object */
this.statesCB.DataBindings.Add("SelectedValue", cust, "StateID", true);