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.

DBGrid Performance

Thread ID:

Created:

Updated:

Platform:

Replies:

24610 Feb 8,2005 08:17 AM Feb 8,2005 04:13 PM Windows Forms 4
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On February 8, 2005 08:17 AM

I have a DBGrid and a DataTable. The DataTable is updated in real time. I want the grid to update itself once every 200ms with the new updates for performance. I understand from the previous answers that once the grid is connected to the DataTable it is notified for every change and reflects it. So to slow down the pace of displayed data, i have to slow down the pace of the DataTable data. If i want to stack the new incomming data and notify the grid with only the changes it it not possible since it is connected to the DataTable (which is great for sorting and so on....) Can we reverse the model and tell the Grid to listen to the dataTable every 200ms and unwire ? Or is there a way to listen to updates only ? BeginLoadData

Administrator [Syncfusion]
Replied On February 8, 2005 09:38 AM

Also i tried to increase the pace of data and in bound mode the CPU grows up to 100 ! An worse it never decrease even when i stop the data flow ! Is this a memory leak of the grid since when i do the same without the grid my model handles it well ?

Administrator [Syncfusion]
Replied On February 8, 2005 11:14 AM

We know of no memory leaks using the GridDataBoundGrid with 3.0.1.0 (or 2.1.0.9). I suspect the processing is just taking that long. You can call grid.Binder.SuspendBinding to turn off the grid istening to updates, and the grid.Binder.ResumeBinding to turn the updates back on. You could try doing this in a timer.Tick event every so often to see if that will let things work for you. You could also use multiple threads, cacheing all the changes in a dataset on a different thread and then every so often call dataset.Merge to update the grid''s datasource with all the cache changes.

Administrator [Syncfusion]
Replied On February 8, 2005 02:03 PM

Clay What is exactly the "model" property in the grid ? IF it is the internal model for the grid then does it means : 1-It has the same size as the external model ? 2-The sorting and filtering occur in the internal model. 3-Where is the optization where the model should take just what it needs to display ? Otherwise why separate the model from the external source ? Thanks again for the time and the great support !!

Administrator [Syncfusion]
Replied On February 8, 2005 04:13 PM

Hi, 1. grid.Model is a reference to the GridModel object. The GridModel contains grid specific information that can be shared across views like row height, column widths, covered ranges and more. In addition the GridModel provides a temporary data cache that contains cell contents. The cell contents are determined by calls to QueryCellInfo. The cache is emptied when garbage collection occurs. With a GridDataBoundGrid an addition Model-like object is introduced, the Binder. The Binder provides specific implementations for QueryCellInfo, SaveCellInfo and managing synchronization with a CurrencyManager and extracting values from a IList (or DataView). 2. The soring and filtering does not occur in the grid. It occurs in the underlying IList (your DataView). The DataView prvoides methods for sorting and filtering data and all the grid does is display those results. 3. The model never keeps data for a long time. The volatile data cache gets emptied frequently and only those rows that are currently visible are loaded into memory using QueryCellInfo calls. At that time additional cell information like color, font, cell type is also determined. This all happens in the GridModel. Stefan >Clay > >What is exactly the "model" property in the grid ? > >IF it is the internal model for the grid then does it means : > >1-It has the same size as the external model ? >2-The sorting and filtering occur in the internal model. >3-Where is the optization where the model should take just what it needs to display ? Otherwise why separate the model from the external source ? > >Thanks again for the time and the great support !!

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.

;