I would like to be able to "couple" and "de-couple" the cascading behavior of a checkbox in the treeview at will. Specifically, I am looking for the following:
1. Make it such that the topmost nodes in the tree (i.e. Level 1), when checked/unchecked, check/uncheck all underlying child nodes.
2. Make it such that all nodes at level 2 or below, when checked/unchecked, does NOT check/uncheck all parent OR child nodes.
3. Make it such that the topmost nodes in the tree (i.e. Level 1) are either checked, unchecked, or indeterminate, based on the checkstate of the underlying child nodes.
Use Case: I am using the treeview to describe a military chain of command in which the topmost nodes represent countries and all child nodes represent individual units (some units can have subordinate units under them which appear as children). I want to bind the checkbox to the Visibility property of a control so that users can easily show/hide units by manipulating the checkboxes. When they check the country checkbox, they should be able to show/hide all underlying units. When they check individual units, however, they are only toggling the visibility of that specific unit.
Can the treeview control be configured to do this?
1. Make it such that the topmost nodes in the tree (i.e. Level 1), when checked/unchecked, check/uncheck all underlying child nodes.
2. Make it such that all nodes at level 2 or below, when checked/unchecked, does NOT check/uncheck all parent OR child nodes.
3. Make it such that the topmost nodes in the tree (i.e. Level 1) are either checked, unchecked, or indeterminate, based on the checkstate of the underlying child nodes.
Use Case: I am using the treeview to describe a military chain of command in which the topmost nodes represent countries and all child nodes represent individual units (some units can have subordinate units under them which appear as children). I want to bind the checkbox to the Visibility property of a control so that users can easily show/hide units by manipulating the checkboxes. When they check the country checkbox, they should be able to show/hide all underlying units. When they check individual units, however, they are only toggling the visibility of that specific unit.
Can the treeview control be configured to do this?