Hello: Thank you for your reply. I appreciate the detailed
explanation...very helpful!!! Below I have outlined a related issue I have
been trying to solve...Any insight would be greatly appreciated

.
I currently have a situation where I have a Collection class derived from
CollectionBase. In this custom collection object I have implemented all the
required interfaces to support complex data binding.
I want child objects to notify the collection class whenever a change occurs
(example: Property value changed). I then want the collection object to
raise the "ListChanged" event defined in the IBindingList interface. This
event will notify any complex controls bound to my collection class that
they should refresh their display.
example (child object - Name property):
Public Property Name() As String
Get
Return ms_Name
End Get
Set(ByVal Value As String)
' This event supports simple data binding
RaiseEvent NameChanged(Me, New EventArgs)
' This causes the OnSetComplete() method of the collection class to
fire
Dim li_Index as Integer = mo_ParentList.IndexOf(Me)
mo_ParentList(li_Index) = Me
End Set
End Property
This code "sets" the current item in the collection to the now modified
child object...This triggers the OnSet() and OnSetComplete() methods of the
collection class. I am currently raising the "ListChanged" event in the
OnSetComplete() method of the collection class...
This notification works perfectly except when I change properties on
multiple objects inside a loop. I get an error because the Enumerator gets
messed up when the "set" occurs inside a loop.
example (Collection Object - Save method)
....
Dim lo_Object as Object
For Each lo_Object in MyCollectionObject
lo_Object.Property = "Some Value"
lo_Object.Save()
Next
....
Any thoughts on a better way to notify the parent object that a change has
occurred in a child object? At this point I think it would be better to
raise an event (example: a ListItemChanegd() event) from the child object
that the CollectionClass can listen for. Then the Collection class could in
turn raise the ListChanged event to facilitate the chain of notification...
Thank you again for the help!!!
Shannon Richards
BBA, AIT, MCP