We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

What event to use for a successful predecessor link?


Dragging a dependency/predecessor to another task seems to fire actionComplete every time you hover over another task.
This happens before the mouse click is released but is there any event fired when a successful dependency is made via drag and drop?
ie i don't want to persist the predecessor in my DB unless the link was a success. 

I can see there is an args.predecessorValidation which is true if the link is valid but as the actionComplete is firing multiple times on hover and not on mouse release i have no way of only saving the link when the user makes a successful link.

What is the correct event to use to save a valid predecessor link?
Thank you

1 Reply

JD Jayakumar Duraisamy Syncfusion Team March 6, 2017 01:22 PM UTC

Hi Bryan, 
Please find the response below, 
In Gantt, we can skip the validation of Predecessor when hover on connector point of another task in actionComplete event by return if the requestType  as “validatePredecessor”. Once we dropped on the valid predecessor at the time actionComplete will trigger with requestType as “recordUpdate” to update the predecessor. 
Please find the code snippet, 
<ej:Gantt ID="Ganttcontainer" 
    function CompleteAction(args) { 
        if (args.requestType == "validatePredecessor") 
        else if (args.requestType == "recordUpdate") { 
We have prepared sample for your reference, please find the sample below, 
Jayakumar D 

Live Chat Icon For mobile
Up arrow icon