Okay, I know it must be something simple I am doing wrong. I have several dozen classes now and child lists are working good informing the parent thru the overriden IsDirty/IsValid properties, ie-
Public Overrides ReadOnly Property IsValid() As Boolean
Get
Return MyBase.IsValid AndAlso _claimFields.IsValid
End Get
End Property
Public Overrides ReadOnly Property IsDirty() As Boolean
Get
Return MyBase.IsDirty OrElse _claimFields.IsDirty
End Get
End Property
But I have this new class with a child list _claimFields and when I only make a change to the child list the Data_Update is not fired, but if i make a change to parent data the Update is fired and if I check the dirty state of the child in the update event it is dirty. I dont think i am doing anything different except that this child is not drawn from the DB but I am creating the child objects by parsing a string in the parent class.
Thanks in advance,
Rob
I am still struggling and am baffled why the dirty child ListBase is not causing the parent Data_Update routine to fire. As I mentioned when I force the Data_Update routine to run by changing something in the parent the child listbase is definitely flagged as dirty.
Thank You,
Rob
It may be dirty but might it also be NOT Valid thus NOT firing the Update (Either the Parent or the Child or another child in the collection / list?
Are you binding to a Windows forms control? You could try writing some test code just setting the properties on the object and seeing what's valid/invalid dirty/not dirty without doing any binding.
In the past I've had some "funnies" where I ended up touching the child collection to force it to be dirty so the code would then go through the children checking those, but that's CSLA1.x days, and probably demonstrates that I couldn't solve the problem correctly.
Hope my limited response helps a bit.
Copyright (c) Marimer LLC