New to Kendo UI for jQuery? Start a free 30-day trial

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:itemkendo.data.OrgChartModel

The item the prospect parents should be identified for.

Returns:Array

The list of all possible parents.

<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(possibleParents);
  });
</script>
Not finding the help you need?
Contact Support