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
4133
Validating Event Fires Even Though Combo Is ReadOnly
posted

I have a combo that I have set to be ReadOnly.  I also have a event handler for the combo's Validating event.  I don't understand why it would fire since the data can't be changed.  Since it is firing, I'm trying to deal with it in the Validating event.  I set CANCEL to TRUE, but focus stays on the combo and the event fires again when I try to tab off of it.  I tried setting focus to the next control, but the event still fires.  Any ideas on how to deal with this?

Parents
No Data
Reply
  • 7555
    Offline posted

    Hello Rehemann,

    Thank you for posting to our forum.

    I followed the instructions you have provided and able to reproduce the behavior you are describing.
    I created a sample of winCombo and set it as readOnly and now I handled validation event and now when I run the sample ,ever time when I am exiting the form validation event does fire.

    I would like to say that this is default expected behavior .I tried performing my test with the Microsoft control too and found that controls did work the same , validation did fire for the readonly comboBox  as well.

    I would like to know why do you have validation event for the control which is readOnly?

Children