Documentation

getParentId

get the ID of the parent node of the specified item

id getParentId(id id );

Parameters

id idID of the child node

Returns

idID of the parent node

See also

Example

tree = new webix.ui({
    view:"tree",
    data: [
        { id:"branch1", value:"The Shawshank Redemption", data:[
            { id:"part1", value:"Part 1" },
            { id:"part2", value:"Part 2" }
        ]}
    ]
});
 
var child = tree.getParendId('part1'); // -> 'branch1'

Back to top