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.

Multithreading with griddataboundgrid

Thread ID:

Created:

Updated:

Platform:

Replies:

22727 Dec 20,2004 01:46 PM Dec 20,2004 03:26 PM Windows Forms 2
loading
Tags: GridControl
Patrick Noble
Asked On December 20, 2004 01:46 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.

Administrator [Syncfusion]
Replied On 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!

Administrator [Syncfusion]
Replied On 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.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

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.

;