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
750
Validation on disabled controls
posted

I need to en-/disable validation for a UltraComboEditor.
Somthing like...

ValidationSettings validationSettings = _validator.GetValidationSettings(_adjustmentMonthComboEditor);validationSettings.Enabled = false;
_validator.SetValidationSettings(_form.AdjustmentMonthComboEditor, validationSettings);

...wont work. I do not want to validate disabled controls.

Please help.

  • 469350
    Offline posted

    Hi,

    I assume _validator is an UltraValidator component? If so, then you do not need the last line of code you have here. Getting the settings and setting Enabled to false on those settings is sufficient, there is no reason to re-assign the settings back to the control. That should not cause a problem, though, it's just redundant.

    What exactly "won't work" here?

    When is this code being called?