TAdvStringGrig cache?

Is there maybe a way to cache data inside TAdvStringGrid? I have about one milijun rows and it consumes about 800 MB RAM. I would need a way to fetch only visible data (something like TDBAdvGrid) to reduce this.

You could use virtual cells. This way, the grid will not store the content of cells. Please see TAdvStringGrid samples 41 or 45 that show this.

I've checked examples and manual regarding virtual cells. Just one question: During export (to csv for example) is grid gonna fill all rows with actual values and once export is done will that memory be dealocated?

During export , it will use the values retrieved via OnGetDisplText. Inside the grid there will never be memory allocated to temporary store all these values. The value is retrieved and directly written out to CSV for example.

That's what I need. Thanks