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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Optimising Performance of GridDataBoundGrid with a Custom Collection

Thread ID:

Created:

Updated:

Platform:

Replies:

22131 Dec 3,2004 03:14 PM UTC Dec 3,2004 10:41 PM UTC WinForms 1
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On December 3, 2004 03:14 PM UTC

Hi, I''m trying to optimise the way I use the GridDataBoundGrid (version 2.1.0.9). I have a background thread updating data held in a custom collection that fires ListChanged events when modified. The grid is bound directly to this collection. The background thread updates the collection every half second firing events immediately before and after the update. I have tried various things including event handlers that SuspendBinding on the grid before an update and resume it afterwards. Because the events are fired in a background thread I have to do an Invoke and call Suspend/Resume binding from the GUI thread. The grid is configured to with UseListChangedEvent and ForceUpdateAfterListChangedEvent set to true. The dataset contains approximately 70 columns and 150 rows. The performance is nowhere near as good as the GridPerf sample and I''m trying to ascertain why. I have to use a custom collection as I have a hierarchical grid*. If I were using ADO.Net I would call BeginLoadData() on my DataTable before updating it. What does the GridDataBoundGrid do when this method is called that enables such good performance with this approach or is this to do with the way DataTable works? Please do you have any suggestions or examples for how to get best the performance from the grid with a custom dataset that is updated in the background? Thanks, Ben. * with some particular requirements that can''t be met using DataTables.

Administrator [Syncfusion]
Replied On December 3, 2004 10:41 PM UTC

The BeginLoadData suspends notification of data changes in the DataTable. Thismeans that event listeners like the grid, do not not hear change events, and do not respond to them. One thing you might try is to batch the updates on the background thread. Then every so often (maybe every 100 - 200 - 300 msecs) raise an event that updates the datasource from the cached updates on the UI thread. This will avoid constant swicthing to the UI thread to respond to every listchanged event for individual updates from the background thread. This may give you better through put.

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.

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

;