943,865 Members | Top Members by Rank

Ad:
  • C# Discussion Thread
  • Unsolved
  • Views: 6002
  • C# RSS
May 11th, 2009
0

Data binding to a Radio Button

Expand Post »
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.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Junior Poster in Training
toadzky is offline Offline
96 posts
since Mar 2007
May 12th, 2009
0

Re: Data binding to a Radio Button

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
Reputation Points: 69
Solved Threads: 75
Posting Pro in Training
JerryShaw is offline Offline
465 posts
since Nov 2006

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 C# Forum Timeline: Processing client messages
Next Thread in C# Forum Timeline: Audio playspeed, reverse playback





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


Follow us on Twitter


© 2011 DaniWeb® LLC