Validating Radio Buttons

R

Ron Green

I have two radio buttons contained by a groupbox in a
winform. I need to make sure that the user selects one of
the radio buttons before hitting submit. Since the radio
buttons are two separate controls and the groupbox cannot
recieve focus, how do I fire the validaing event so that
the errorprovider will warn the user to select one?
 
H

Herfried K. Wagner [MVP]

* "Ron Green said:
I have two radio buttons contained by a groupbox in a
winform. I need to make sure that the user selects one of
the radio buttons before hitting submit. Since the radio
buttons are two separate controls and the groupbox cannot
recieve focus, how do I fire the validaing event so that
the errorprovider will warn the user to select one?

Are you sure you are talking about Windows Forms? Why not preselect one
of the buttons?
 
R

Ron Green

I'm trying to avoid setting a default. There really is no
default which means it would have at least a 50% chance
being wrong.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top