binding radio buttons

Please support our VB.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: May 2005
Posts: 2
Reputation: majackson is an unknown quantity at this point 
Solved Threads: 0
majackson majackson is offline Offline
Newbie Poster

binding radio buttons

 
0
  #1
May 30th, 2005
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
Reply With Quote Quick reply to this message  
Join Date: May 2005
Posts: 2
Reputation: majackson is an unknown quantity at this point 
Solved Threads: 0
majackson majackson is offline Offline
Newbie Poster

Re: binding radio buttons

 
0
  #2
Jun 12th, 2005
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.
Reply With Quote Quick reply to this message  
Join Date: Mar 2005
Posts: 263
Reputation: Toulinwoek is an unknown quantity at this point 
Solved Threads: 2
Toulinwoek's Avatar
Toulinwoek Toulinwoek is offline Offline
Posting Whiz in Training

Re: binding radio buttons

 
0
  #3
Jun 13th, 2005
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.
:!: In The Beginning, God; In The End, God. In between, believe whatever you like. :)
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for VB.NET
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC