Windows Vista Beta | WinVistaBeta.com - Message | ListView question

October 07, 2008  
Subject: ListView question
Group: microsoft.public.windows.developer.winfx.avalon
Date: 5/15/2008 2:49:24 PM
From: IndyStef [Email Address Protection]

I want to display a large amount of dynamic data in a ListView. The items
are not from a database, but in a sorted List<Item> collection. They change,
say, every second. I'm dealing with something around 10,000 items.
I have successfully bound my collection to the control through ListView.ItemsSource.
The initial display is fine. When the first update is due, I call ListView.Items.Refresh()
- no errors there. But as soon as I want to scroll, or select an item in
the list, AFTER calling ListView.Items.Refresh, I get an NullReferenceException.
I do not want to implement my collection as ObservableCollection, because
I fear the massive amount of data and the frequent updates will cause performance
problems.
Does anybody have an idea why I am getting exceptions after calling ListView.Items.Refresh()
when the items are in a List<T>, which has been assigned to ListView.ItemsSource?

Thanks,

Stefan



Back