944,161 Members | Top Members by Rank

Ad:
  • VB.NET Discussion Thread
  • Unsolved
  • Views: 19428
  • VB.NET RSS
May 30th, 2005
0

binding radio buttons

Expand Post »
I'm trying to bind a radio button's checked property to an Access field defined as Yes/No and am having no success. I can programmatically read the dataset field and set the radio button, but I than have difficulty adding a new record and setting the dataset field to be updated in the dataset.

When I set the binding in the Property box for the radButton.checked to the Access dataset field, I cannot add/update/delete any records.

Is there something special about radio buttons that they don't bind the same as other controls? Should I be binding a different property than the checked property?

Michael
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
majackson is offline Offline
2 posts
since May 2005
Jun 12th, 2005
0

Re: binding radio buttons

From Advanced Programming Using Visual Basic.NET by Bradley and Millspaugh, 2003 p. 170

The Binding Bug
A big bug exists in the first release of ADO.NET: The AddNew method fails to clear all bound controls if a boolean field that is bound to a check box does not have a default value. For more information, see the Microsoft Knowledge Base article #Q321504. The article explains two ways to work around the bug: (1) change the field in the database to have a default value or (2) change the dataset schema in the application to assign a default value to the field.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
majackson is offline Offline
2 posts
since May 2005
Jun 13th, 2005
0

Re: binding radio buttons

Reply to "The Binding Bug"

The question was in regard to a radio button. I have been unable to find a way to bind groups of radio buttons to a database field. If there is a way, I'd sure like to know what it is. Checkboxes are easy, because they are two-state (mainly) controls, but a set of radio buttons can have several choices, and I don't know of a database field type that can deal with that from a binding standpoint. I'm sure there must be at least some workaround that provides the needed functionality, but as I am a very inexperienced programmer, I couldn't provide anything effecient, or that would work at all.
Reputation Points: 10
Solved Threads: 2
Posting Whiz in Training
Toulinwoek is offline Offline
274 posts
since Mar 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in VB.NET Forum Timeline: Problems with a launch condition in vb.net Application
Next Thread in VB.NET Forum Timeline: Help, record arrays





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC