Hello
Im working with TreeView and I have a little problem when a property changed and the value propagation. I attached a photo for show it better.
I will try explain:
If I change "Status" property to a parent node, this new "Status" is propagated to its children. For example, I change to RIB2 node "Status" to disable(Gray), all children of RIB2 will change their "Status" to disable. Or I change "Status" to R2FFA node, this change will only affect to that node becouse it is last one.
The problem I have is propapage the "Status" of a child node to parent node. The "Status" property is calculated in all parent nodes, I mean, that property comes from "Status" of subnodes, only last children nodes, have the value of "Status".
get
{
//Si tiene representable point, devuelve su valor
if
(
this
.Representable_Point !=
null
)
{
return
this
.Representable_Point.Status;
}
//Si no, el de sus hijos
else
{
return
this
.Get_Child_Status();
}
}
Any parent node has representable point, so always calculate "the Status". Get_Child_Status will return a enum value or null.If all children have the same "Status" it will get that status, if at least one child, has different status from the rest, that method will return null.
Then, how can I propagate to parent node updateproperty when, child node property has changed?
Thank you for help!
Regards!