C control on validating

Rated 4.94/5 based on 810 customer reviews

For certain control, once it has focus, it will validate its data for closing, leaving, etc.. So the only problem when changing pages is when all the child controls on the form have no focus, then swith pages will not trigger the child controls' validating events.For this issue, I think there are 2 workarounds: 1.Hi Dennis, Based on my understanding, you want to validating all the controls on the tabpage before switch pages.I think you should hook the Validating event for all the controls on your form.

Selected Index Changed event, you can explicit invoke all the validating event handler, if not valid, then swith back to the orignal tabpage.

Event Args e) bool b_switch=false; private void button1_Click(object sender, System.

Event Args e) Thank you for your patience and cooperation.

Thanks, Dennis Hi, Dennis did you try to hook Tab Page. Selected Index Changed event, you can explicit invoke all the validating event handler, if not valid, then swith back to the orignal tabpage.

Ideally, I think the best solution is not to leave a tab until the validating event has completed successfully. Being able to do that might help for my particular circumstances. If you have multi-tab entry form final validation should occur only when final tab page is filled and confirmed. I guess maybe I should have asked only how to prevent a user from leaving a tab page. I think you should hook the Validating event for all the controls on your form.

Leave a Reply

  1. Free live hacked sex cams 15-Nov-2020 19:16

    Best Free Dating Sites 2019 Meet 1000s Mature Singles in Your Area.

  2. pagdating alamid guitar chords 31-May-2020 04:41

    I believe in God’s power to transform his life, and he does too, but this is still scary.

  3. guy still dating website 22-Dec-2019 00:52

    Guys who were a lot taller were always the most exciting, since I rarely had the opportunity to feel short before.