DHTMLX Docs & Samples Explorer

onTaskEndDrag

onTaskEndDrag event is fired when user finished dragging a Task item, and only if user has dragged the task to a new location.

One parameter is passed to the handler:

  • task - GanttTask object which was dragged.
    ganttChartControl.attachEvent("onTaskEndDrag", function(task){
        if (task.getId()==13) {
            // Move another related task to the same location
            ganttChartControl.getProjectById(1).getTaskById(2).setEST(task.getEST());
        } else
          alert("New EST = " + task.getEST());
    });