onRowDragStart

fires before the user drags a row of the grid to vertically reorder it

boolean onRowDragStart(string|number id,HTMLElement target,Event e);
idstring|numberthe id of the task that the user drags in the grid
targetHTMLElementan HTML element of the task that the user drags
eEventa native event object
booleandefines whether the default action of the event will be triggered (true) or canceled (false)

Example

gantt.attachEvent("onRowDragStart", function(id, target, e) {
    //any custom logic here
    return true;
});

Related samples

Details

The event is fired when a task is moved by the mouse pointer in the left-hand grid, while the order_branch setting is enabled. If branch reordering is disabled, the event will never be called.

The event is blockable. Return false to cancel dragging.

See also
Back to top