We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Can a GridControl be used in a multithreaded application?



Like the most Windows Forms controls, the GridControl can be used in multithreaded applications as long as you use the Invoke/InvokeRequired techniques to make sure that all the interactions with the Grid is done on the thread that created it.

The requirement for using multiple threads is that every UI control must interact with the UI thread that created it. The simple way to do this is to use InvokeRequired to test whether you are on the wrong thread.

So, anytime you access the Grid from within a method that may have been called from the non-UI thread, you must use the grid.InvokeRequired to test whether this call is coming on the UI thread. If not, then you must call grid.Invoke on a new delegate to force the call to be on the UI thread.

There is a couple of articles on MSDN online by Chris Sells that discusses this problem. Here is a link to an article by Ian Griffiths that discusses these problems and also provides links to the Sells articles.

You can refer to the attached sample that illustrates how to use these ideas with the Grid.


Article ID: Published Date: Last Revised Date: Platform: Control:
457 04/30/2011 02/12/2015 Windows Forms GridControl
Did you find this information helpful?
Add Comment
You must log in to leave a comment

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon