Some methods doesn't work

Hello. Could you help me with this problem, please?

I have context menu with button “test”:

function context_menu(menuitemId, type) {
var data = tree.contextID.split(““);
if(menuitemId.split(”
”)[0]==“test”) {
var parent= tree.getParentId(data[0]);
alert(parent);

    tree.selectItem(1);
    tree.focusItem(1);
    return true;
      }

}

OK, the first (alert) is only for context menu functional testing. It tells me, that context menu works fine. But in fact, i need select node (for example id=1). Why selectItem and focusItem doesn’t work? And I have this problem with more methods. Thanks

tree.loadXML(“pb_xml.php”, function() {
tree.selectItem(2);
}
…doesn’t work too. XML is loaded correctly, but item is not selected.

Check if “1” and “2” - ids of the existent items in Tree. You can find working example here dhtmlx.com/docs/products/dht … _item.html