mustangman96
Programmer
How can I bind my checkbox control to a dataset?
I use sqlDataAdapter to generate the dataset.
The SQL column type is "bit" and allows nulls. Name is: "active".
This works fine with a textBox:
But this doesn't work with my checkBox:
The code runs and when I click on the dataGrid the following error raises:
"DataBinding could not find a row in the list that is suitable for all bindings"
I use sqlDataAdapter to generate the dataset.
The SQL column type is "bit" and allows nulls. Name is: "active".
This works fine with a textBox:
Code:
this.mytextBox.DataBindings.Add("Text",this.dsMyDataSet.partners,"name");
But this doesn't work with my checkBox:
Code:
this.mycheckBox.DataBindings.Add("Checked",this.dsMyDataSet.partners,"active");
The code runs and when I click on the dataGrid the following error raises:
"DataBinding could not find a row in the list that is suitable for all bindings"