I used the List<Person> collection
as the ItemsSource for the DataGrid control.
But it did not update the View if i remove the item from the List collection. I was struggling for a long time for the solution.
Then Instead of the List<Person>
collection in my ViewModel. I changed this into ObservableCollection<Person> collection
. Now it updates the view when ever there is a change in the collection.
I am not sure why it updates only for ObservableCollection<Person>
? Anyone ?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…