Z
Zoodor
I have some code, in .NET 2.0 that is making use of the BindingList<T> class.
When an item is added to the list, the ListChanged event is fired as
expected. However, if I change the value of one of the properties of an item
in the list, the ListChanged event is not raised. I am sure I must be missing
something pretty simple, but cannot figure out what. Can anybody help me?
RaiseListChangedEvents is set to true and the object in the list that is
being changed implements the INotifyPropertyChanged interface (and is
definately raising the PropertyChanged event (or at least trying to, but
nothing is listening) when the property's value is changed - I have checked
this using the debugger).
Some example code that is "misbehaving" is:
BindingList<CustomType> list = new BindingList<CustomType>();
CustomType item = new CustomType();
list.Add( item );
list.ListChanged += List_ListChanged;
item.SomeProperty = "NewValue"; // No ListChanged event fired
Thanks in advance
When an item is added to the list, the ListChanged event is fired as
expected. However, if I change the value of one of the properties of an item
in the list, the ListChanged event is not raised. I am sure I must be missing
something pretty simple, but cannot figure out what. Can anybody help me?
RaiseListChangedEvents is set to true and the object in the list that is
being changed implements the INotifyPropertyChanged interface (and is
definately raising the PropertyChanged event (or at least trying to, but
nothing is listening) when the property's value is changed - I have checked
this using the debugger).
Some example code that is "misbehaving" is:
BindingList<CustomType> list = new BindingList<CustomType>();
CustomType item = new CustomType();
list.Add( item );
list.ListChanged += List_ListChanged;
item.SomeProperty = "NewValue"; // No ListChanged event fired
Thanks in advance