Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1115
How I can get node by key?
posted

How I can get node by key?

I try this

var node = null,
nodes = $find('AmalgamationTree').getNodes();

for (var i = 0; i < nodes.get_length(); i++) {
if (nodes.getNode(i).get_key() == number) {
node = nodes.getNode(i);
index = i;
break;
}
}

Parents
  • 37874
    posted

    Hello Anton,

    Your code should be working. Just note that if you are using load on demand, this will iterate through the nodes that are loaded at that time.

Reply Children
No Data