Dealy

Dealy

  • NA
  • 213
  • 0

Problem with checkbox in bindingNavigator

Sep 13 2009 2:26 PM
Hello,

I have a checkbox in a databindingNavigator. How can i get its state?
In my database i have a field call checked(nvarchar) that gets value 1 if checkbox is checked and 0 if unchecked.
I get that value in a textfield, so i have the following:

Textbox temp_check=new Textbox();
temp_check.Databindings.Add("Text",bindSource,"CHECKED");

if (temp_check.Text=="1")
check1.CheckState=System.Windows.Forms.CheckState.Checked;
else
check1.CheckState=System.Windows.Forms.CheckState.Unchecked;

My problem is that with the above code i set checkbox to checked/unchecked for all records not only the specific. How can i connect it to my bindingNavigator?

Thank you in advance.



Answers (5)