Validation of a form

3 posts, 0 answers
  1. Kris Anderson
    Kris Anderson avatar
    153 posts
    Member since:
    Feb 2010

    Posted 26 Nov 2006 Link to this post

    Hi. I'm starting to build a Windows forms app using telerik components and wondered how you can validate a form. I've noticed the "causesValidation" property but wasn't sure if it's similar to the way ASP.NET pages are validated, using the Page.IsValid() function call. I didn't see any validation controls and wondered what the best-practices are for validation of a Win form.

    By the way, I'm extremely impressed by the r.a.d. controls for WinForms. They're powerful, functional, and very aesthetically pleasing. Thank you :)
  2. Chris
    Admin
    Chris avatar
    221 posts

    Posted 27 Nov 2006 Link to this post

    Hi Alex,
    First, thanks for the nice words.
    You can take a look at the following article and see how you could validate controls in WinForms. Basically you should use the controls' Validating and Validated events. You could also use an ErrorProvider component to display warnings about controls which are not validated. Currently all r.a.d.controls support the Validating and Validated events and also have the CausesValidation property which determines whether the control should fire the validation events of each control on the form. We intend to release a hotfix this week in which we'll introduce validation on item level. For example clicking on a TabStrip item won't change the selected tab item if some of the controls on the form were not properly validated.

    Regards,
    Chris
    the telerik team
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Kris Anderson
    Kris Anderson avatar
    153 posts
    Member since:
    Feb 2010

    Posted 27 Nov 2006 Link to this post

    Thanks, Chris. Your help is much appreciated.
Back to Top