0

I use ProperyGrid in windows form .net framework 4.8. I use some property as ObservableCollection. My project is almost correct but when I modify an item in ObservableCollection by Collection Editor window, CollectionChanged event run too many. Run a Clear event and as many as Add Event that count of my list final elements number. How could I prevent it just run once at end run.

So if I will have a 7 elements -> "continue" in Clear and Add 1st, ... Add 6th element, and run an event when added 7th element finally.

I starting use ObservableCollection or some probe with IBindingList. I would like run an event when collecton property editing ended but property change event just run for single properties. So I would like use an event - this part is OK - and I need call this when collection added new item, removed item or edited item.

  • with that option too: on Collection editor there can cancel modify so if canceled maybe could cancel modified.
Rand Random
  • 7,300
  • 10
  • 40
  • 88
  • Did you check if you are registering to `CollectionChanged` multiple times? eg. https://dotnetfiddle.net/v2ck3J | compared to only registering once https://dotnetfiddle.net/HZe1tI – Rand Random Jun 12 '23 at 10:08

0 Answers0