onLinkValidation

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

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

Example

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

Details

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