-1

I am using a BindingList in my code because I want the extra features that ObservableCollection is lacking. Mainly the ItemChanged event being raised when one of the items in the list that implement INotifyPropertyChanged has a property that has changed.

But, on the code that subscribes to the ListChanged event I am having difficulty to get which items were deleted. The event, when raised, gives me the index of the item for which "something happend" on it. So in the case of ItemAdded and ItemChanged events, I can get the item directly using the index. But in the case of deleted? How can I retrieve which item was deleted?

John Demetriou
  • 4,093
  • 6
  • 52
  • 88
  • @JuanCarlosRodriguez Yeah, for some reason searching did not yield that result. Now I need to wait for the bounty time to finish before closing. I tried closing it myself but because of the bounty we need to wait – John Demetriou Sep 11 '18 at 07:39

1 Answers1

0

A BindingList by itself is not able to perform this function.

There is an excellent answer that shows how to extend the BindingList to get that functionality. Get Deleted Item in ItemChanging event of BindingList

Rob S
  • 76
  • 2