How to showing/hiding to sub-node at CollapseNode

i want showing/hiding to sub-node of CollapsingRecordNode at Demo1 sample



here is base collapsingnode…



RootNode

+ A-ListGroup

AA-Node

AB-Node

+ B-ListGroup

BA-Node

BB-Node

+ C-ListGroup

CA-Node

CB-Node



if

RootNode.A-ListGroup.AA-Node.Visible = false;

and

RootNode.B-ListGroup.Visible = false;



Result is…



RootNode

+ A-ListGroup

AB-Node



After…

if

RootNode.A-ListGroup.AA-Node.Visible = true;

and

RootNode.B-ListGroup.Visible = true;



Result is originally collapsingrecordnode.



RootNode

+ A-ListGroup

AA-Node

AB-Node

+ B-ListGroup

BA-Node

BB-Node

+ C-ListGroup

CA-Node

CB-Node







Give me some idea.

thanks.

So… you are not collapsing, you’re hiding a sub-item with no way for the user to “show” it?

My guess is when you set the item (like AA-Node) to visible=false, it just creates a hole in the CollapsingRecordNode without collapsing it. is that right?

like below CollapsingRecordNode…



Root Node

+ A-ClassNode

AA-SubNode

AB-SubNode

AC-SubNode

+ B-ClassNode

BA-SubNode

BB-SubNode



if BA-SubNode and BB-SubNode is Visible = false,

i want to be automatically hide B-ClassNode.



after that



if BA-SubNode Visible = true,

i want to be automatically show B-ClassNode with BB-SubNode



is it possible?

If you set any CollapsingRecordNodeItem to visible=false, you have to then call CollapsingRecordNode.LayoutChildren(null) to property layout the node. Note if you expand and collapse the parent, the invisble Item will now be visible, as that’s how the whole expand/collapse thing works.

Hiding/showing the parent if all the children are hidden is something you're going to have to handle as you set the child's state.
Ultimately, I think you're working against the design of the node here. Since it already uses visibility for collapse and expand, throwing in extra things that play with visibility is going to lead... well, I'm not sure.
I think the better strategy is for you to actually remove BA-SubNode, etc if you don't want them to be a part of the heirarchy.

ok. thanks jake.