Why does a databound check box generate a null value and how can I stop it?
Posted on 2009-05-06
I have a databound check box which works perfectly unless you uncheck the box at runtime. If you do that, the value in the underlying table is set to null even though the check box checked value can only be true or false?
The checkbox is bound like this:
addressControl.statementCheckBox.DataBindings.Add("Checked", addressesBindingSource, "Statement", true, DataSourceUpdateMode.OnPropertyChanged, false);
"Statement" is a boolean column in the table connected via the addresses bindingsource.