PC Review Forums Newsgroups Microsoft DotNet Microsoft Dot NET Framework Forms Validating Radio Buttons

Reply

Validating Radio Buttons

 
Thread Tools Rate Thread
Old 10-12-2003, 05:24 PM   #1
Ron Green
Guest
 
Posts: n/a
Default Validating Radio Buttons


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?
  Reply With Quote
Old 10-12-2003, 05:33 PM   #2
Herfried K. Wagner [MVP]
Guest
 
Posts: n/a
Default Re: Validating Radio Buttons

* "Ron Green" <anonymous@discussions.microsoft.com> scripsit:
> 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?

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
  Reply With Quote
Old 10-12-2003, 05:44 PM   #3
Ron Green
Guest
 
Posts: n/a
Default Re: Validating Radio Buttons

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.

>-----Original Message-----
>* "Ron Green" <anonymous@discussions.microsoft.com>

scripsit:
>> 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?
>
>--
>Herfried K. Wagner [MVP]
><http://www.mvps.org/dotnet>
>.
>

  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off