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

Custom calculation of dates for parent task

Hi,

In Gantt, currently , it calculate dates for parent items on the basis of child task, how can i set dates for parent task according to our custom calculation rather then calculation on the basis of child elements?


Thanks,

Nivedita

1 Reply

JD Jayakumar Duraisamy Syncfusion Team March 15, 2017 06:50 AM UTC

Hi Nivedita, 
In Gantt, we can customize the dates for parent task and the dates are independent of its child tasks. It can be achieving by adding the Boolean property for parent tasks in the data source to consider as   manual scheduling mode and use the API’s “taskSchedulingMode” as “custom” and “taskSchedulingModeMapping” as “Boolean property name” to enable this support. 
Please refer following code snippet, 
var scheduleModeData = [ 
             { 
                 "TaskID": 1, 
                 "TaskName": "Parent Task 1", 
                 "StartDate": new Date("02/23/2014"), 
                 "EndDate": new Date("02/27/2014"), 
                 "Progress": "40", 
                 "isManual" : true, 
                 "Children": [ 
                  //…]} 
]; 
 
$("#GanttContainer").ejGantt({ 
//… 
taskSchedulingModeMapping: "isManual", 
taskSchedulingMode: ej.Gantt.TaskSchedulingMode.Custom, 
}); 
We have also prepared sample for this and to know more details about task scheduling mode, please refer following links. 
Regards, 
Jayakumar D 


Loader.
Live Chat Icon For mobile
Up arrow icon