Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
280
Compare Controls?
posted

Is there a way to use the UltraValidator to compare the values of two or more controls? For example; one of three textboxes must not be null. What's the best way to do this using UltraValidator?

  • 69832
    Offline posted

    Implement Infragistics.Win.ICondition, which is a very simple interface, and assign the implementation to the ValidationSettings.Condition property. The implementation would probably take references to the controls that are players in the validation, then the ICondition.Matches method would check whatever criteria you want to enforce, and return true or false accordingly to signify whether it passes validation.