Hello,
I want to delete rows from listview in WPF. I am getting this error,
"Operation is not valid while ItemsSource is in use. Access and modify elements with ItemsControl.ItemsSource instead."
Delete Rows from Listview in WPF
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.


Piyush PansuriyaRank #454 · 5.5K reputationPosted Jan 4, 2015, 11:37 PM EST
If you want to delete rows from listview, You have to remove object from ItemSource which you had assign to listview.
Ex:
lstview.ItemSource = Coll;
While Removing : Coll.DeleteObject(lstview.SelectedItem As obj);