I have a multi-level tree structure and the user would want to select only a particular parent node or all child nodes below it.

There can be multiple trees with multiple levels one below another

The user expects that he:

  1. should be able to select only a particular parent node without selecting its children

  2. should be able to select all children just by selection of parent, without selecting one by one manually since the tree hierarchy can be long.

Can this be handled in an elegant way? The system is only for Desktop, not mobile/tablet.

enter image description here


1 Answer 1


You have the problem that you want to have two actions on one element.

I can see some solutions. But in the end it depends on your users which one would be the best solution.

  • users will expect that the click on one checkbox does change the state of the clicked checkbox only, this should be the standard behavior. Use right mouse click to give an option to select all children nodes. This will only work if your users have learned that this is a possibilty since it is not visible
  • Use a switch to change the behavior, this makes it clear to the user that both possibilities are available
  • Use a secondary action. If a user selects a node with subnodes enable the action 'select children' and/or 'deselect children'.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.