Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Looking for radio button solutions
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
01137390
Message ID:
01137493
Views:
20
Patrick,

>Being a winforms newbie, I just discovered the mess with winforms radio buttons.
>
>Anyone have a general MM solution for:
>1) setting the checked radio button from data
>2) firing event to set data row value (and other interface actions)?

I agree...the Windows Forms team at Microsoft was asleep at the wheel when designing radio buttons. Here's a quote from the MM .NET Dev Guide about them under the topic "How do I create a group of radio buttons":

"Note that Windows Forms Radio buttons are odd animals They are more a "loose confederation" of individual controls rather than acting as a single control. You can't data drive the selection, because there is not a single value that represents the selection for the entire group. Each radio button in a group has its own Checked property which is either true or false. You may want to consider a combo box as an alternative to radio buttons."

If you really want radio buttons, you could create your own user control. Here are a few links on the subject:

http://msdn.microsoft.com/msdnmag/issues/04/07/AdvancedBasics/
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwinforms/html/custcntrlsamp2.asp

Best Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform