Expand the sub-graph and selection

how to expand or collapse the sub-graph by using go.Binding, i have node which property have to be used for it

new go.Binding("isExpanded","booleanVal")
new go.Binding("isSelected","booleanVal")

I need like this.

I have to handle those expand or select in my own states

Some samples demonstrate that, such as Kanban, https://gojs.net/latest/samples/kanban.html

new go.Binding("isSubGraphExpanded", "expanded").makeTwoWay()

This is on a Group template.