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.
Unfortunately, activation email could not send to your email. Please try again.

What event to use for a successful predecessor link?

Thread ID:

Created:

Updated:

Platform:

Replies:

129220 Mar 5,2017 05:04 PM Mar 6,2017 08:22 AM ASP.NET Web Forms 1
loading
Tags: Gantt
Bryan Conlon
Asked On March 5, 2017 05:04 PM

Hi,

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

Jayakumar Duraisamy [Syncfusion]
Replied On March 6, 2017 08:22 AM

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" 
//… 
ActionComplete="CompleteAction" 
</ej:Gantt> 
<script> 
    function CompleteAction(args) { 
        if (args.requestType == "validatePredecessor") 
            return 
        else if (args.requestType == "recordUpdate") { 
            debugger; 
        } 
    } 
</script> 
We have prepared sample for your reference, please find the sample below, 
Regards, 
Jayakumar D 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;