Using CSLA2.1
I have an object (Inherits BusinessBase), which contains a collection of child objects (Inherits BusinessListBase). Each child object inherits BusinessBase.
My object is bound to a form, with the child collection bound to an editable datagirdview. One of the properties of the child object is a boolean (check box in datagridview), and can be selected by the user.
However, this property can only be true for 1 of the child objects at any given time. Is there any way for the child object to notify its parent collection to loop through all its children and take the necessary action?
Regards
Des Norton
Thanks Chris
Works great. Implemented slightly differently, though.
Loop through grandchildren, adding up number of true properties. Set shared Grandchild.Property "NumberOfSelectedItems". Custom validation rule enforces that shared property=1.
Possibly slightly more overhead, but the collection currently has 6 grandchildren, unlikely to ever reach double digits. Also ensures a more consistant GUI. User is shown all "Issues" and required to fix them before saving.
Regards
Des Norton
Copyright (c) Marimer LLC