DHTMLX Docs & Samples Explorer

onTaskStartDrag

onTaskStartDrag event is fired when user starts to drag a Task item.

One parameter is passed to the handler:

  • task - GanttTask object which is being dragged.

You may return false from this handler to cancel dragging.

    ganttChartControl.attachEvent("onTaskStartDrag", function(task){
        // Disable dragging of Task with Id = 3
        if (task.getId()==3) return false;
    });