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
754
UltraDateTimeEditor not thread-safe? Or strange invoke issue
posted

Dear all,

we have currently a form to which we dynamically add some self-written tab controls. One of this tabs uses a control which in turn uses a DateTime editor.

Now we have some external event, if it triggers we want to disable all the controls on this form. We therefore need to know if we need an invoke or not. Simply, all the tabs are subscribed to this event, and the event handlers make a check to see if InvokeRequired is true. If so, the tab sets its own Enabled property to false by calling a delegate, if not, Enabled is set to false directly.

This works for all tabs except for this one where we have the control with the DateTime editor. The exception which comes up says that the change to the DateTime´s Enabled-property cannot be made because the control was created on another thread.

So, the Parent´s Enabled property code seems to not check if it needs an Invoke for the cildren - but why on earth there is such a thing like controls being added to a parent control by another thread? We do not start any threads at all in this form constructor etc....

 

any ideas? thanks Florian

 

Parents
No Data
Reply
  • 469350
    Suggested Answer
    Offline posted

    Hi Florian,

    If you are not creating any threads in your application, then that error message does not make any sense to me.

    UltraDateTimeEditor is not, in fact, Thread-safe, but neither is any DotNet control, including the inbox control. But I doubt that has anything to do with this error message.

    What version of the controls are you using? The first thing I recommend is that you get the latest service release and see if that helps. This might be a bug that was recently fixed.

    How to get the latest service release - Infragistics Community

    If that does not help, then I recommend that you either:

    • Wait for the next service release (which is due to release in December) on the chance that this bug is fixed internally, but didn't make it into the current service release.
    • Or, post a small sample project demonstrating the exception so we can check it out.
Children