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 ?
ADAdministrator Syncfusion Team 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 ?
ADAdministrator Syncfusion Team February 8, 2005 11:14 AM
We know of no memory leaks using the GridDataBoundGrid with 184.108.40.206 (or 220.127.116.11).
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.
ADAdministrator Syncfusion Team February 8, 2005 02:03 PM
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 !!
ADAdministrator Syncfusion Team February 8, 2005 04:13 PM
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).
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.
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.
>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 !!