getting error System.InvalidOperationException: 'Cross-thread operation not valid: Control 'FrmOrgs' accessed from a thread other than the thread it was created on.' when closing Radflyoutmanager

1 Answer 68 Views
Flyout Form
Shuvrangshu
Top achievements
Rank 1
Shuvrangshu asked on 22 Sep 2024, 06:15 PM
I am trying to invoke a radfloyout manager from a form which is a child of the main application form. When i close the radflyoutmanager from the flyout usercontrol, i am getting the error "System.InvalidOperationException: 'Cross-thread operation not valid: Control 'FrmOrgs' accessed from a thread other than the thread it was created on.'" I am unable to figure out why this is happening.
i have tried setting the associated form as both the main screen form as well as the child form but i keep getting the same error.

1 Answer, 1 is accepted

Sort by
0
Dinko | Tech Support Engineer
Telerik team
answered on 25 Sep 2024, 09:39 AM

Hi Shuvrangshu,

The RadFlyoutManager internally uses a background Thread for showing the flyout. It seems that some code is trying to reference the FrmOrgs class from another thread. That is why you are getting this exception. Without seeing the code I can't say which code triggers this exception. You can double-check to see if something references the FrmOrgs class. In addition, if you can isolate this exception in a standalone project, I will investigate more carefully on my side and try to find a way to prevent this exception.

Regards,
Dinko | Tech Support Engineer
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Flyout Form
Asked by
Shuvrangshu
Top achievements
Rank 1
Answers by
Dinko | Tech Support Engineer
Telerik team
Share this question
or