getBranchIndex

gets index of the node in a specific branch

number getBranchIndex(id id);
ididtree node ID
numberindex of related tree node

Example

var tree = webix.ui({
    view:"tree",
    data: [
        { id:"branch1", value:"The Shawshank Redemption", data:[
            { id:"1.1", value:"Part 1" },
            { id:"1.2", value:"Part 2" }
        ]}
    ]
});
 
var index  = tree.getBranchIndex("1.1"); // -> 0
var index1 = tree.getBranchIndex("1.2"); // -> 1

See also
Back to top
If you have not checked yet, be sure to visit site of our main product Webix html5 ui library and page of tree grid ui product.