Several igTree methods require a node index to be specified, however, I cannot find in the documentation how to determine the index of any node.
Hello Ray,
After an investigation, I have determined that the path of the parent nodes represent the index. However, the child nodes could not be accessed by index. What I could suggest is accessing the node elements by value or by their path.
The path of a node could be accessed by using the nodeFromElement method. This could be achieved as follows:
var nodeObject = $("#tree").igTree("nodeFromElement", nodeElement);
var path = nodeObject.path;
Additionally, I have noticed that most of the igTree methods require the node element or the node object as an argument.
I have prepared a sample, demonstrating some of the igTree methods. Please test it on your side and let me know if you need any further information regarding this matter.
Regards, Monika Kirkova, Infragistics
Thank you for your response. Unfortunately, this does not address my situation. I am using the addNode method significantly to add a tree node to a parent node, but not always as the last child of the parent node. In this instance, the method requires the nodeIndex of the child node prior to which I want to insert a new node. For my situation I have determined a way to keep track of this for each node in my tree. However, along with the { path: "node_path", element: jQuery LI Element, data: data, binding: binding } that can be retrieved for each child node, it would be nice to include nodeIndex as one of the values rather than requiring a significant work around, which I put in place, to keep track of this for each child node.