Posted 22 September 2021, 6:07 am EST
I’m simplifying the numbers here but:
I have an ```
ODataVirtualCollectionView
There are 20,000 rows in the result set in question; the [b]Pagesize[/b] for the view is set to 200.
I have selection row 10,000 in the grid, and used shift-click to select row 15,000
I now want to materialize the rows represented by that selection.
The method I'm using at the moment to call ```
setWindow(10,000, 15,000)
``` on the view and then poll the underlying collection to check if all of the rows I'm interested in are non-null.
I can see in the background that the view makes several odata calls to backfill the data after the ```
setWindow
``` call has been made. It makes ~5 calls, as the page size on the server is set to 1,000.
I can see that all of the data I need has been returned as far as the network calls are concerned by examining the return values for each call in Chrome debugger network tab.
However when I check the underlying ```
items
``` or ```
sourceCollection
``` properties of the view, the full set of rows have not been populated and in fact the number seems to vary up and down.
I do this check once every couple of seconds on the equivalent of a timer.
What do I need to do to reliably materialize data in to a virtual collection like this?
Is there a single event I can hook into that tells me that ```
setWindow
``` has finished satisfying the request, and what should I look at to be certain I have all of the data?