When there are 2 connected tasks (Task A and Task B) like below:
... Task B would move to the right as Task A is moved, like this:
However, you might also want it to move backwards as Task A is moved back.
While this is supported, Task B can move back only until it's "preferred start time".
So, what exactly is a task's preferred start time? This varies based on your settings.
Scenario 1:
You have not setup PreferredStartTimeBinding in the gantt. In other words, the underlying task object does not contain a property with the "preferred start time" value.
In this case, when the task is loaded in the gantt, it's start time becomes it's preferred start time.
So, Task B cannot go backwards as Task A goes back:
Scenario 2:
You have setup PreferredStartTimeBinding and the task has a property called PreferredStartTime.
$gantt_container = $('#gantt_container'); $gantt_container.GanttControl({ PreferredStartTimeBinding: new RadiantQ.BindingOptions("PreferredStartTime"), }); |
Then when you create a new task, you give it a proper PreferredStartTime like this:
var gantt = $gantt_container.data("GanttControl"); gantt.AddNewItem({ "Name" : "Task 3", "ID" : 3, "PredecessorIndices" : "1", "StartTime" : "2014-02-04T00:00:00Z", "PreferredStartTime":"2014-01-30T00:00:00Z", "Effort" : "16:00:00", "Resources" :"1", "Description" : "Description of Task 3" }); |
Then you will see that the task will move backwards until the specified PreferredStartTime is hit.
Note that the gantt will update this PreferredStartTime value for a task whenever the user moves a task manually (as opposed to the task getting moved automatically because of dependency).
PreferredStartTime:
This option allows us to set the preferred start time for every activity which overrides the overall ProjectStartDate. Programatically, a task can't be moved behind the PreferredStartTime.
For Example:
Consider, if ProjectStartDate is set to 07/04/2020 and PreferredStartTime is set as 02/04/2020 for the activity whose task name is "Task 5" (Task 5 is a dependent task).
All tasks can't be moved behind ProjectStartDate(07/04/2020) whereas Task 5 can't be moved behind PreferredStartTime(02/04/2020).
� RadiantQ 2022. All Rights Reserved.