I use the tree in ThreeStateCheckbox-Mode. If a user checks all childs of a parent node I don’t want to receive the child id’s, I only need the parent id. With the 3 methods I found in the manual

- getAllChecked()

- getAllPartiallyChecked()

- getAllCheckedBranches()

this is not possible.

Some time ago I used your JavaApplet, and with the applet it was possible to get only the parent id.

Is there any way to realise my need?

Thank you in advance.


There are no ready to use method , but you can use next approach

var ids=tree.getAllChecked().split(",");
var final=[];
for (var i=0; i<ids.length; i++)
if (tree.hasChildren(ids[i])) final.push(ids);

final - array of checked parent elements