Edit this page

predecessors

Returns a list of all predecessor dependencies for a certain task.

Parameters

id String |Number |Object

The id of the Gantt task, based on which the dependencies are filtered.

Returns

Array the list of all task predecessors.

Example - get all task predecessors

<script>
  var dataSource = new kendo.data.GanttDependencyDataSource({
    data: [
      {
        id: 1,
        predecessorId: 1,
        successorId: 2,
        type: 0
      },
      {
        id: 2,
        predecessorId: 2,
        successorId: 3,
        type: 0
      },
      {
        id: 3,
        predecessorId: 3,
        successorId: 1,
        type: 1
      }
    ]
  });

  dataSource.fetch();

  // returns dependency 3
  var dependencies = dataSource.predecessors(1);
</script>
Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article

close
Dummy