fires when the user adds a new link and dhtmlxGantt checks whether the link is valid

boolean onLinkValidation(object link);
linkobjectthe link object
booleandefines whether the default action of the event will be triggered (true) or cancelled (false)


gantt.attachEvent("onLinkValidation", function(link){
    //any custom logic here


The event fires in the isLinkAllowed method.

The event fires when a user creates a new link between tasks by drag-and-drop with the mouse.

If the event handler returns false, the round handler of the target task will be colored in red and the link won't be added. Returning true will highlight the round handler in orange and allow creation of a link.

See also
Back to top