I have a data grid in a view that is bound to a List in a viewmodel. I have a lot of data to retrieve for the list, so I want to break it up into many small retrievals inst
Have you tried using an ObservableCollection<T>
rather than a List<T>
I assume you have a public property called Cars similar to...
public List<Car> Cars{
get { return this._cars;}
set
{
this._cars = value;
base.OnPropertyChanged("Cars");
}
}
If not this will not actually do anything...base.OnPropertyChanged("Cars")
;
Extension Method AddRange
for ObservableCollection
public static class Extensions
{
public static void AddRange(this ObservableCollection obj, List<T> items)
{
foreach (var item in items)
obj.Add(item);
}
}