Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to bind mmRadioButton controls
Message
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
01070962
Message ID:
01071449
Vues:
16
Rick,

>How do I bind radio buttons to a single field.

>Here's what I've tried
>
>I have a Bizobj called "boTest" with a character field "cData"
>Dropped an mmPanel onto a form
>Dropped an mmRadioButton named "optOne" onto the panel
>Dropped an mmRadioButton named "optTwo" onto the panel
>I set the BindingProperty of optOne and optTwo to "Tag"
>I set the BindingSource of optOne, and optTwo to boTest
>I set the BindingSourceMember of optOne, and optTwo to cData
>I set the Tag of optOne to "one"
>I set the Tag of optTwo to "two"
>
>In the record I'm viewing, I've set the cData field to "two"
>
>No errors are raised, and neither of the mmRadioButtons are checked
>
>Any suggestions?
>
>Do I drop them on an mmGroupBox and set the binding properties of the mmGroupBox rather than the mmRadioButtons?

This is another one of those "it's different than you are expecting from VFP" situations. The Windows Forms radio button is a completely different animal and doesn't data bind in this way. When you have a group of buttons inside a GroupBox, you can't bind the group of buttons to a single data source and have one of the buttons selected. Is it possible to use a combo box instead?

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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform