getParentNode ();
The getParentNode method returns the parent node.
To execute this example, the page must contain the TreeList component named treeList (see Example of Creating the TreeList Component). Add an event handler for TreeList.NodeDblClick:
treeList.NodeDblClick.add(function (sender, args) { var n = args.Node.getParentNode(); if (n == null) n = sender; n.getNodes().deleteNode(args.Node); });
After executing the example on double click on a tree node in any hierarchy level, this node will be deleted.
See also: