prospectParents

Returns a list of all items in the source that can be parents of the passed item. It will filter-out the item and the full hierarchy of its children.

Parameters

item kendo.data.OrgChartModel

The item the prospect parents should be identified for.

Returns

Array The list of all possible parents.

Example

<script>
  var dataSource = new kendo.data.OrgChartDataSource({
    data: [
      { id: 1, name: "Jill", title: "Boss", expanded: true },
      { id: 2, name: "James", title: "Lead", expanded: true, parentId: 1 },
      { id: 3, name: "Joe", title: "Worker", expanded: true, parentId: 2 },
      { id: 4, name: "Jack", title: "Worker", expanded: true, parentId: 2 },
    ]
  });

  dataSource.read().then(function() {
    var possibleParents = dataSource.prospectParents(dataSource.data()[1]);
    console.log(children);
  });
</script>
In this article