dependencies kendo.data.GanttDependencyDataSource
The dependencies data source of the widget. Configured via the dependencies option.
Changes of the data source will be reflected in the widget.
Assigning a new data source would have no effect. Use the setDependenciesDataSource method instead.
Example - add a dependency to the dependencies data source
<div id="gantt"></div>
<script>
$("#gantt").kendoGantt({
dataSource: [
{
id: 1,
orderId: 0,
parentId: null,
title: "Task1",
start: new Date("2014/6/17 9:00"),
end: new Date("2014/6/17 11:00")
},
{
id: 2,
orderId: 1,
parentId: null,
title: "Task2",
start: new Date("2014/6/17 12:00"),
end: new Date("2014/6/17 14:00")
}
]
});
var gantt = $("#gantt").data("kendoGantt");
gantt.dependencies.add({
predecessorId: 1,
successorId: 2,
type: 1
});
</script>
Example - remove a dependency from the dependencies data source
<div id="gantt"></div>
<script>
$("#gantt").kendoGantt({
dataSource: [
{
id: 1,
orderId: 0,
parentId: null,
title: "Task1",
start: new Date("2014/6/17 9:00"),
end: new Date("2014/6/17 11:00")
},
{
id: 2,
orderId: 1,
parentId: null,
title: "Task2",
start: new Date("2014/6/17 12:00"),
end: new Date("2014/6/17 14:00")
}
],
dependencies: [
{
predecessorId: 1,
successorId: 2,
type: 1
}
]
});
var gantt = $("#gantt").data("kendoGantt");
var dependency = gantt.dependencies.at(0);
gantt.dependencies.remove(dependency);
</script>