UserControl Validation

W

wirawan ngurah

Hi all,

I make a user control that need validation. So before one control is
validated another control cannot focus. but when iam trying to
check/uncheck checkbox and radiobutton, click button with different
usercontrol, these controls can focus and executed. it makes me very
confuse. Need help from all of you guys, how to solve this problem.

I have uploaded my simple program at this link below
http://rapidshare.de/files/13003561/WindowsApplication2.rar.html

try to click control in yellow area, compare with control color are.

Thanks in advance
Wirawan
 
B

Bruce Wood

So before one control is validated another control cannot focus.

Do you mean within the UserControl itself, or on the enclosing Form,
from one UserControl to another?

Could you give more details about what your UserControl does? It might
help us give you better information.
 
W

wirawan ngurah

Hi Bruce,

Thanks for your response.
Have you seen my simple program?

I add some validation in validating event of textbox control, so when
the text of textbox contain character '.', i give e.Cancel to true so
the focus still in the textbox control. it works when i try to move to
controls in the same parent or on the form. But when i try to move to
another user control, example (in my simple program )where the
background colour is yellow i still can check/uncheck the checkbox.
What i want is before the textbox is valid user cannot execute another
control.

Regards
Wirawan
 

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