Force repaint dbgrid

I am sorry to trouble you all with yet another of my problems.


I am using TDBAdvGrid in pagemode and with ADO dataset using asyncfetch and cache (1000). 
The grid paints every time I open the TADOQuery object, but with asyncfetch enabled every now and then I will just get a grid with all the lines but with no data inside them. 
I have tried to refresh the grid but with no luck.
Any sure way to refresh the grid?

Another note.
When the grid contains no data the TADOQuery object has RecordCount, but it is already at EOF.
I can change the scroll position to First() but that does not alter the grid.

Again, any help is very welcome.

Any ideas?

Did you try to set grid.DataSetType = dtNonSequenced?

Yes I've tried that.

It's the combination of PageMode and eoAsyncFetchNonBlocking that triggers this.

I've made another observation.
Sometimes the grid will not be empty but it will not contain all data.
I made a query that returned 1300 rows, 9 out of 10 times it would show all 1300 rows, but every now and then it would show only the last couple of hundreds rows. The dataset cache was set to 1000 so I suspect that it only showed the "second" batch of rows.

For me it seems like the grid tries to draw before the rows are available, but you would know better than I. And since I can't do nothing about that I was hoping maybe there was a way of manually make trigger a redraw of the grid when I am sure that all rows have been retrieved. Is there a method of manually trigger a redraw of the grid?

The most efficient we think would be if you could provide us some sample source app with which we can reproduce the problem here. Do you implement the OnGetRecordCount event and if so, are you 100% sure you return the correct count there?
To force a redraw, try to call grid.Refresh.

If a problem persists, please contact us by email with as much details/information and preferably sample source project so we can investigate it deeper.