parent

Returns the jQuery element that corresponds to the given node parent.

Parameters

node jQuery|Element|String

Specifies the node which parent is needed.

Returns jQuery

The parent node (if any).

Example

<div id="orgchart"></div>

<script>
    $("#orgchart").kendoOrgChart({
        dataSource: [
            { id: 1, name: "Jane", title: "Boss", expanded: true },
            { id: 2, name: "John", title: "Lead", expanded: true, parentId: 1 },
            { id: 3, name: "Jill", title: "Worker", expanded: true, parentId: 2 },
            { id: 4, name: "James", title: "Worker", expanded: true, parentId: 2 },
        ]
    });

    var orgChart = $("#orgchart").getKendoOrgChart();
    var node = orgChart.items()[1];

    console.log(orgChart.parent(node));
</script>
In this article
Not finding the help you need? Improve this article