resize

Fired when the user is resizing a task.

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

e.task kendo.data.GanttTask

The task which is being moved.

e.start Date

The current task start date.

e.end Date

The current task end date.

e.preventDefault Function

If invoked prevents the action.

e.sender kendo.ui.Gantt

The widget instance which fired the event.

Example - subscribe to the "resize" 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")
    }
  ],
  resize: function(e) {
    console.log(kendo.format("task's curren Start {0:g}", e.start));
    console.log(kendo.format("task's curren End {0:g}", e.end));
  }
});
</script>

Example - subscribe to the "resize" event after initialization

<div id="gantt"></div>
<script>
function gantt_resize(e) {
  console.log(kendo.format("task's curren Start {0:g}", e.start));
  console.log(kendo.format("task's current End {0:g}", e.end));
}
$("#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("resize", gantt_resize);
</script>
In this article
Not finding the help you need?