Advertisement

12.05.2007 at 05:39PM PST, ID: 23005001
[x]
Attachment Details

validating radiobutton in winform doesnt work

Asked by Farzadw in C# Programming Language, Microsoft Visual Basic.Net

Tags: , ,

I followed this example to validate my 2 textboxes:
http://devcenter.infragistics.com/Articles/ArticleTemplate.Aspx?ArticleID=1263

I have 2 radiobuttons, I have them in a panel. User must select a radiobutton. Otherwise, they should get a msg like that example. Not sure why it doesnt work. I clicked on the "events" and added the event. My code is like this. I have an errorProvider. I even set the debugger, clicked OK and the validating event didnt trigger...

Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
private void rbIBM_Validating(object sender, CancelEventArgs e)
        {
            if (!rbSQL.Checked & !rbIBM.Checked)
            {
                errorProvider1.SetError((Control)sender, "Please choose a System");
 
            }
            else
            {
                errorProvider1.Clear();
            }
 
        }
 
Loading Advertisement...
 
[+][-]12.05.2007 at 06:18PM PST, ID: 20416862

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]12.05.2007 at 06:29PM PST, ID: 20416916

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12.05.2007 at 08:14PM PST, ID: 20417359

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]12.05.2007 at 11:35PM PST, ID: 20417885

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]12.05.2007 at 11:59PM PST, ID: 20417984

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: C# Programming Language, Microsoft Visual Basic.Net
Tags: errorprovider, event, winforms
Sign Up Now!
Solution Provided By: arif_eqbal
Participating Experts: 4
Solution Grade: A
 
 
[+][-]12.06.2007 at 05:51AM PST, ID: 20419475

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628