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.
Syncfusion Feedback

Shifting task with his predecessors on gantt chart

Thread ID:

Created:

Updated:

Platform:

Replies:

132240 Aug 22,2017 03:05 PM UTC Aug 29,2017 12:31 PM UTC JavaScript 3
loading
Tags: ejGantt
Karol Wlodarek
Asked On August 22, 2017 03:05 PM UTC

Hello,

I've got an issue with shifting task and its predecessors on Gantt chart. I would like predecessors to shift along when the task gets prolonged or moved in time.
I have already tried using property 'enablePredecessorValidation', but it solves my problem only partially, because when task gets prolonged the gap between the task and predecessor is first taken, then predecessors are moved.
I would like to keep the gap untouched.


Regards,
Karol

Suriyaprasanth Ravikumar [Syncfusion]
Replied On August 23, 2017 11:02 AM UTC

Hi Karol, 
We can able to maintain the gap between the two tasks which are connected by predecessor by providing ”offset” value to the predecessor. 
Please refer this link to know more details about predecessor offset. 
We have modified the provided sample, please refer following code snippet,  
 
$("#GanttContainer").ejGantt({ 
                "dataSource": [ 
   { 
      //..    
          { 
              "id": 4183, 
              //.. 
              "predecessors": "4184FS+10d,4185FS" 
          }, 
          { 
              "id": 4182, 
              //.. 
              "predecessors": "4183FS+4d" 
          }, 
       //..  
   } 
                ], 
       //.. 
}); 
 
We can also use validation dialog to validate the predecessor link manually. If the user moved the successor task the dialog will be rendered with below options, 
  • Cancel, Keep the existing link
  • Remove the link and move the task to start on edited date.
  • Move the task to start on edited date and keep the link.
Refer this link to know further details about predecessor validation dialog. 
Please refer following code snippet to enable predecessor validation dialog, 
 
$("#GanttContainer").ejGantt({ 
 
                //.. 
 
                "actionBegin": "actionBegin" 
            }); 
<script> 
        function actionBegin(args) { 
            if (args.requestType == "validateLinkedTask") { 
                args.validateMode.preserveLinkWithEditing = false; 
            } 
        } 
    </script> 
 
We have modified the provided sample, please find the sample location below. 
Please let us know if require further assistance on this. 
 
Thanks, 
Suriyaprasanth R. 


Karol Wlodarek
Replied On August 28, 2017 07:57 AM UTC

Hi, 

Thanks for Your reply. The answer is helpful, but I need one more thing.

Is it possible to compute the offset when I load Gantt chart for the first time?

Regards,
Karol

Suriyaprasanth Ravikumar [Syncfusion]
Replied On August 29, 2017 12:31 PM UTC

Hi Karol, 
As per the current behavior tasks date values are validated according to predecessor and it’s offset value in data source. 
It is not possible to compute the offset value in Gantt at initial load time. There is only option to provide necessary offset value in data source before load into the Gantt. 
Please let us know if you require any other assistance on this. 
 
Thanks, 
Suriyaprasanth R. 


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.

Warning Icon 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.Close Icon

;