say i have a tree with the option to check, being enabled:
what if i only want to select Berries, without selecting either strawberries or blueberries? the user does not now whether its strawberries or blueberries, but needs to enter that it is a Berry.
how can i allow a user to select a parent node only, without checking all childnodes?
i tried the function UpdateAllChildren which is readily used to set the checkstatus of the children, but it unchecks the parent as well.
this is what i tried
function clientNodeChecked(sender, eventArgs)
var node = eventArgs.get_node();
var childNodes = eventArgs.get_node().get_nodes();
var isChecked = eventArgs.get_node().get_checked();
UpdateAllChildren(childNodes, false); // i changed the parameter here to always be false so that childnodes are not checked when a parent is clicked. when a child is clicked, the parents will be set to indeterminate state as per normal procedure
//i tried setting the code here to only select node (the parent node), it checked all the child nodes
//checks or unchecks all nodes
function UpdateAllChildren(nodes, checked)
for (i=0; i<
if (nodes.getNode(i).get_nodes().get_count()> 0)