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
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:
Hi,
If you do not want to upload your sample here, you can send it to the following support ticket that I created for you: CAS-57141-F52M19.
Please, let me know if you need any additional help.
Regards,
Stefaniya