save

Fired when a task field is updated upon user interaction.

The event handler function context (available via the this keyword) will be set to the widget instance.

Event Data

e.task kendo.data.GanttTask

The GanttTask which has been edited.

e.values Object

The GantTask fields being updated with new values.

e.preventDefault Function

If invoked prevents the save action and prevents the task from being edited.

e.sender kendo.ui.Gantt

The widget instance which fired the event.

Example - subscribe to the "save" event during initialization

<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")
    }
  ],
  save: function(e) {
    console.log("Save task:", e.task.title);
  }
});
</script>

Example - subscribe to the "save" event after initialization

<div id="gantt"></div>
<script>
function gantt_save(e) {
    console.log("Save task:", e.task.title);
}
$("#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");
gantt.bind("save", gantt_save);
</script>
In this article
Not finding the help you need?