how to bind checkbox in windows form?

  • Thread starter Thread starter Ritesh Jain via DotNetMonster.com
  • Start date Start date
R

Ritesh Jain via DotNetMonster.com

Hi,
Instead of text property u should bind "Checked" property of checkbox

Regards,
Ritesh
 
When navigating through data you have to change the bindingcontext positon:
for example:
Me.BindingContext(Dataset1.DataTable1).Position += 1

HTH,
Friso Wiskerke
 
I have bind textboxes in my form successfully using the databindings >
text property. but don't know how to bind checkbox. i set the checkbox
databindings > text property the same with textbox but it doesn't
work.

anyone know how to do this.
 
Hi,
Instead of text property u should bind "Checked" property of checkbox

Regards,
Ritesh

Yah I've tried it but the problem is I can't navigate to the next
record. I have also tried to use code instead in the databindings
properties.

this is my code
BirthCertificate.DataBindings.Add("Checked",
dsStudentCourse.Tables("Students"), "BirthCertificate")
 
Thanks for the reply but I have already a working navigation button.
The only problem is that when i add a databinding in checked property
the navigation to my record is not working. dont know why.
 
JayPee,
Thanks at last I solved the problem. This is a bug in checkbox
control.

What bug, when you set it to text you bind a boolean to the text in the
checkbox.

When you bind it to checked as Ritish wrote than it should write it to the
boolean (although that is the way it works for me).

Therefore I am curious what is the bug?

Cor
 
Thanks at last I solved the problem. This is a bug in checkbox
control.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top