Adding up on a post of 4 months ago which unfortunately didn't receive any answer.
I'm basically standing before the same problem when using multiselection in a datagrid with shift.
When in somewhere in the middle of a huge list (say it's 1,000,000 items in the grid, all data virtualized) and I were to select from 500,000 to 500,050 using shift + mouse click, the grid calls the "GetEnumerator()" method of my virtual list (similar implementation to Vincent's and Paul's). What I did until now was just a SelectMany on the cached pages. But unfortunately resulted in the rows not being properly selected (while ctrl + mouse click does the job!).
So what I found is, that the DataGrid actually expects all items from index 0 to the last of the selection. This, obviously, isn't ideal for a list of 1m items as this would result in requests for each and every item from 0 till (in my example) 500,050 and thus loading everything form database.
So my questions would be the same as those of Daniel in th elinked posted above:
Why does the DataGrid request items multiple times (selected items are requested ~6-7 times in a row for no apparent reason)?
Is there a way to tell the DataGrid not to use the Enumerator and to just take the items selected and not iterate through from 0 on?
Thank you very much, hoping I have more luck in getting at least thought provoking answers, as there isn't much to be found concerning data virtualization.