Objective Grid: Caching a virtual grid

Article ID: 204
Last updated: 04 Jun, 2018
Article ID: 204
Last updated: 04 Jun, 2018
Revision: 3
Views: 1906
Posted: 11 Jan, 2001
by Meltreger B.
Updated: 04 Jun, 2018
by Meltreger B.

Problem


How can I implement some caching in a virtual grid?
 


Cause



Action


If you want to implement some kind of caching, you might override the OnDraw() method. There, you could determine the top row with
 

nFirstRow = GetTopRow();

and the bottom row of the grid with
 

nLastRow = CalcBottomRowFromRect(GetGridRect());

You could then check these rows to see if they fit into your current cached page and load/unload the rows from your cache appropriately.

This article was:   Helpful | Not helpful
Report an issue
Article ID: 204
Last updated: 04 Jun, 2018
Revision: 3
Views: 1906
Posted: 11 Jan, 2001 by Meltreger B.
Updated: 04 Jun, 2018 by Meltreger B.

Others in this category