See attached simple app.
Basically when DataGridView.VirtualMode is true, it fires the CellValueNeeded event to retrieve the value of each cell instead of keeping it in the grid. How you provide the data and cache or page depends on the data source, the architecture, etc. There are several example for the DataGridView in WinForms that you can use to implement a caching system connected to your data base and caching requirements.
Shows how to implement a Cache manager that selected from the database X rows on demand when the VirtualMode grid needs them. The class DataRetriever in the sample uses an SqlConnection but it’s easy to change to use Linq and any other data adapter.
Please login first to submit.