removeTask

Removes the specified Gantt task.

Parameters

task String|kendo.data.GanttTask

The task which should be removed. Also accepts a string which is the uid of the task which should be removed.

Example

<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")
    }
  ]
});
var gantt = $("#gantt").data("kendoGantt");
var task = gantt.dataSource.at(0);
gantt.removeTask(task);
</script>
In this article