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>