locked
data virtualization via a ListView RRS feed

  • Question

  •  I presented the below query on the WPF forum, but it might get more mileage on this network since it has to do with "Data and WPF" - and it could be i'd need to move to VS 2010 to better be able to do what i am asking below....

     

     I  have a collection that i bind to my WPF ListView.  It is (what i call) a "data window" to the larger mass of data that i access via a webservice.  I think i'll write my own bindable custom collection, deriving from ObservableCollection<T> or alternatively a collection that implements IList and INotifyCollectionChanged.   So when my "data window" changes the ListView gets its data automatically.   I have have found a few links on this challenge, herehere, here, here, and here, on the basis i which i could formulate the following three questions.



    (a) Which custom collection way should i go?  Either way will dynamically update my ListView.  I am refactoring my current collection List<T> that i tweaked so it Sorts real fast.  But i can write a good Sort() method for either of the two refactoring ways.

    (b) I'd like the scrollbar in my ListView to emulate that it is viewing much larger data than the Collection to which the ListView is actually binded.
    Suggestion for this?

    (c) How to get events from the scrollbar, like when scrolling to an area of data i have not yet downloaded? 
    I'd need this to decide when to update the collection i binded to or alternatively rebind the ListView.
     
    The above points (b) and (c) concerns lazy loading of data - i hope it has someones interest!

    Please note that i am aware that my ListView does UI virtualization via its viewport of the data it is already binded too.  I am looking to implement data virtualization that augments the already existing UI virtualization.   It is a new requirement that my ListView be used to view online data.  I would like the scrollbar to represent the range of data available.  As the user scrolls, the data is brought in, in "chuncks", thus lazy loading.

    Thanks,


    Paul
    Thursday, January 29, 2009 2:02 PM