Try this select all child node:
$(function(){
var inEventHandler = false;
$("#tree").dynatree({
checkbox: true,
selectMode: 2,
[...]
onSelect: function(select, dtnode) {
// Ignore, if this is a recursive call
if(inEventHandler)
return;
// Select all children of currently selected node
try {
inEventHandler = true;
dtnode.visit(function(childNode){
childNode.select(true);
});
} finally {
inEventHandler = false;
}
}
or search node by name:
var match = null;
tree.visit(function(node){
if(node.data.title === "foo"){
match = node;
return false; // stop traversal (if we are only interested in first match)
}
});
alert("Found " + match);