Data binding to a Radio Button

Please support our C# advertiser: Intel Parallel Studio Home
Reply

Join Date: Mar 2007
Posts: 68
Reputation: toadzky is an unknown quantity at this point 
Solved Threads: 0
toadzky toadzky is offline Offline
Junior Poster in Training

Data binding to a Radio Button

 
0
  #1
May 11th, 2009
I have a couple radio button groups in my Windows Form that I would like to bind to a data table.

When I query the database for a single record, I just grabbed row zero and used if-else to select the one i wanted.

Unfortunately, when I get multiple records, I can't do that.

I'm not sure which property should be bound to make it select the right button based on current record.
Reply With Quote Quick reply to this message  
Join Date: Nov 2006
Posts: 436
Reputation: JerryShaw is on a distinguished road 
Solved Threads: 72
JerryShaw JerryShaw is offline Offline
Posting Pro in Training

Re: Data binding to a Radio Button

 
0
  #2
May 12th, 2009
Are you saying that when you change rows, you want to know how to set the radio buttons to have the correct one checked ?
The BindingSource has an event for position change. Setup a BindingSource for this table, and attach an event handler to its PositionChanged event.

// Jerry
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



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC