This project is read-only.

Problem with

Topics: Developer Forum
Aug 22, 2008 at 5:04 PM
Edited Aug 22, 2008 at 5:09 PM
I Raf, i use your collection with my entity written in But the raf collection don't track the status item correctly.
I have translate the [field: NonSerialized]  in :


Protected Sub OnDataChanged(ByVal PropertyName As String)
If PropertyChangedHandlers IsNot Nothing Then
    RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(PropertyName))
End If
End Sub 
<NonSerialized()> _ 
Public PropertyChangedHandlers As Generic.List(Of PropertyChangedEventHandler)
Public Custom Event PropertyChanged As PropertyChangedEventHandler Implements INotifyPropertyChanged.PropertyChanged
    AddHandler(ByVal value As PropertyChangedEventHandler)
If PropertyChangedHandlers Is Nothing Then
PropertyChangedHandlers = New Generic.List(Of PropertyChangedEventHandler)()
    End If
    End AddHandler 
   RemoveHandler(ByVal value As PropertyChangedEventHandler)
    End RemoveHandler 
    RaiseEvent(ByVal sender As Object, ByVal e As PropertyChangedEventArgs)
        For Each Element As PropertyChangedEventHandler In PropertyChangedHandlers
    Element.Invoke(sender, e)
End RaiseEvent 
End Event

When get HasChanges don't return the correct value (true in this case). I have look when i modify a row _PropertyChanged is always null



void OnPropertyChanged(object sender, PropertyChangedEventArgs e) 
if(_PropertyChanged != null
if(_Status == ObjectStatusType.Normal) 
_Status =
this, e); 





What is the problem ?? My translation in ??
Thanks Stefano
Aug 23, 2008 at 11:38 AM
Sorry, but the problem is not If i don't use Add for adding item, for eg. when deserialize a collection, the status tracking don't work fine.
If i add the item work fine for the parent and child collection.