Closed xiaods closed 11 years ago
In our own code we do this:
$('#search').click(
function() {
var $tree = $('#tree1');
var search_term = 'xyz';
var tree = $tree.tree('getTree');
tree.iterate(
function(node) {
if (node.name.indexOf(search_term) == -1) {
// Not found, continue searching
return true;
}
else {
// Found. Select node. Stop searching.
$tree.tree('selectNode', node, true);
return false
}
}
);
}
);
@mbraak good point. it works like a charm.
Dose anyone can give some hints? thanks a lot.