Skip to main content

onBeforeRowDragMove

Description

Fires before a row of the grid is dragged vertically to a different position

onBeforeRowDragMove: (id: string | number, parent: string | number, tindex: number) => boolean;

Parameters

  • id - (required) string | number - the id of the task to move in the grid
  • parent - (required) string | number - the parent id
  • tindex - (required) number - the index of the position in the parent branch that the task will be moved to

Returns

  • result - (boolean) - defines whether the default action of the event will be triggered (true) or canceled (false)

Example

gantt.attachEvent("onBeforeRowDragMove", function(id, parent, tindex){
// return true/false;
});

Details

The event is blockable. Return false to cancel moving of a row.

note

The event fires only if the option order_branch is set to the "marker" value.