Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Bound checkbox question

Status
Not open for further replies.

azrobert

Programmer
Apr 27, 2002
392
0
16
US
I have multiple checkbox's on a form that are bound to a data source.
they are all working properly and my updates are working fine.
I added a check / uncheck all button and it looks like it is
working (shows the checkbox's checked or unchecked) but is not
changing the underlying data source. I am changing them using
Checkbox1.CheckState = CheckState.Checked etc.....

when I look at the data source when saving it always shows the
value the form was loaded with. If I change a textbox or other bound
control on the form it seems to reflect the changes in the data source......

Any ideas on what I am missing ?

Thanks in advance.
 

Try using the checkbox's Checked property instead of the CheckedState property:

Checkbox1.Checked = True

or

Checkbox1.Checked = False

I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson

Arrrr, mateys! Ye needs ta be preparin' yerselves fer Talk Like a Pirate Day!
 
tried both.............


it works as expected when I manually click the checkbox's
but if I change them from code it is like they were not changed.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top