onRowDragStart
Description
Fires before the user drags a row of the grid to vertically reorder it
onRowDragStart: (id: string | number, target: HTMLElement, e: Event) => boolean;
Parameters
id- (required) string | number - the id of the task that the user drags in the gridtarget- (required) HTMLElement - an HTML element of the task that the user dragse- (required) Event - a native event object
Returns
result- (boolean) - defines 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
note
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.
Related API
Related Guides
Need help?
Got a question about the documentation? Reach out to our technical support team for help and guidance. For custom component solutions, visit the Services page.