getParentId

get the ID of the parent node of the specified item

id getParentId(id id);

Parameters

ididID of the child node

Returns

idID of the parent node

Example

files = new webix.ui({
    view:"filemanager",
    data: [
        { id:"branch1", value:"Documents", date: 1420717913, type:"folder", data:[
            { id:"doc1", value:"Prices", type:"excel", date: 1420717913, size:"13" },
            { id:"doc2", value:"Products", type:"doc", date: 1420717913, size:"15" }
        ]}
    ]
});
 
var child = files.getParentId('doc1'); // -> 'branch1'

See also
Back to top