Link to home
Start Free TrialLog in
Avatar of Camillia
CamilliaFlag for United States of America

asked on

validating radiobutton in winform doesnt work

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...


private void rbIBM_Validating(object sender, CancelEventArgs e)
        {
            if (!rbSQL.Checked & !rbIBM.Checked)
            {
                errorProvider1.SetError((Control)sender, "Please choose a System");
 
            }
            else
            {
                errorProvider1.Clear();
            }
 
        }

Open in new window

SOLUTION
Avatar of Jaime Olivares
Jaime Olivares
Flag of Peru image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Camillia

ASKER

that didnt do it . Not sure what to google for even...
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
let me read, try and will post back tonight.