in
Forums
Blogs
Files
Devexpress.Com
ClientCenter
Support Center
DevExpress Channel

Disable OK button until all form controls are OK (including xtrausercontrols)

Last post 8/21/2008 3:32 AM by Diego Bonfil. 1 replies.
Page 1 of 1 (2 items)
Sort Posts:
Previous Next
  • 8/4/2008 11:22 AM

    Disable OK button until all form controls are OK (including xtrausercontrols)

    Hi all,

    I have build some XtraUserControls that I put in a parent form along with some other TextEdits. This parent form has a typical "Ok" button, that has to be enabled only if the form has no errors (i.e: all controls are validated).

    I would like to integrate all of them into the DxValidationProvider (both textedits and xtrausercontrols) so I can check if the form is validated in a general way, say: dxValidationProvider1.Validate();

    I could not find a general approach to this problem, so I had to use the .NET standard Form method "ValidateChildren" in order to force the validation of the underlying controls. And, if I want to disable/enable OK button in parent form, I also had to force the external validation of the xtraUsercontrol using a custom event "ForceValidating", handled by parent form which in turns invokes the Validating event in the xtraUserControl.

    It sounds harder than it really is.

    So my question is, for that "simple" escenario, does DXperience provide a standar method (and easier) of doing this?

    Many thanks! (I'm using DXperience WinForms v8.1.5)

  • 8/21/2008 3:32 AM In reply to

    Re: Disable OK button until all form controls are OK (including xtrausercontrols)

    Toc, toc...

    Any thoughts? I think this HAS to be an usual use case: "Disable OK button until form validates (including embedded xtraUserControls...)"

     

    Thanks for reading Wink

Page 1 of 1 (2 items)
Copyright © 1998-2008 Developer Express Inc.
ALL RIGHTS RESERVED