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. Image for the cookie policy date

Multithreading with griddataboundgrid

I have a tab control with a grid on each of three tabs and each grid sourced from a different table in the same dataset. When I try to update the dataset from a database on one thread I find that I can''t navigate around the UI on another thread and seem to go into a deadlock condition.

2 Replies

AD Administrator Syncfusion Team December 20, 2004 02:38 PM

>I have a tab control with a grid on each of three tabs and each grid sourced from a different table in the same dataset. When I try to update the dataset from a database on one thread I find that I can''t navigate around the UI on another thread and seem to go into a deadlock condition. >Having investigated further, I now see that it is nothing to do with updating the same dataset on one thread that I am navigating around on another thread. I am experiencing a massive performance problem when I update any dataset on one thread and then try and move between tabs with grids on another thread. I guess this a bit vague to answer!


AD Administrator Syncfusion Team December 20, 2004 03:26 PM

What version of our controls are you using? If it is earlier than 2.1.0.9, you should try a later version. The GridDataBoundGrid reacts to the datasource being updated by listening to events. The event handlers are protected with grid.InvokeRequired checks. If the event was raised on teh thread that did not create the grid, then a grid.Invoke is used to put the call onto the grid''s thread. Otherwise, things lock up. This does mean that if the datasource is being updated very quickly, then there is constant switching of threads which can slow things down. One thing you can try is to batch your updates in another datatable, and then do a dataset.Merge to do all the updates at once, and you could make sure this batch update happens on the grid''s thread.

Loader.
Live Chat Icon For mobile
Up arrow icon