Posted 05 Jun 2013
Link to this post
I'm populating a GridView with a large (>10k) number of items and using VirtualQueryableCollectionView with a load size of about 500. I've also enabled deferred scrolling so that the user can quickly scroll to any part of the list without the UI feeling sluggish.
From what I can gather the virtualized elements that get loaded start at the first element visible on the screen and go from there. That's fine if the user is scrolling down because the load only happens once every 500 records, but if the user scroll *up* then a complete 500-record load occurs once for every line scroll. What I need/want is for 250 records to be loaded on either side of the first visible element, that way the user can thumb scroll to anywhere in the list and then mouse scroll in either direction without hitting the database constantly as they're scrolling.
What's the best way to achieve this? Is it possible to force the loading of a given range of items in response to the ItemsLoading event?