dotnetmonitor.com |
|
||||||||||||
| With virtual mode,
you can implement your own data management operations. This is necessary to
maintain the values of unbound columns in bound mode when the control is sorted
by bound columns. The primary use of virtual mode, however, is to optimize
performance when interacting with large amounts of data.
You attach the DataGridView control to a cache that you manage, and your code controls when data rows are pushed and pulled. To keep the memory footprint small, the cache should be similar in size to the number of rows currently displayed. When the user scrolls new rows into view, your code requests new data from the cache and optionally flushes old data from memory.
When you are implementing virtual mode, you will need to track when a new row is needed in the data model and when to rollback the addition of the new row. The exact implementation of this functionality will depend on the implementation of the data model and the transaction semantics of the data model; whether commit scope is at the cell or row level.
For more info about Virtual mode, see the Virtual Mode topic later in this document. |
||||||||||||
|
||||||||||||