Unlink parent task duration with child task duration

Hi! 
Is there a way to unlink parent task duration with child task duration?
For example, I have the start date of my parent task on Mar 01 and end Date Mar 10
But if my child task has a start date of Mar 05 and end Date Mar 07 my parent task will use these dates

Another question that I have is, is there a way to create tasks by clicking inside the gantt component in a specific date? 


Thanks! 


2 Replies

PS Premkumar Sudalaimuthu Syncfusion Team March 7, 2022 02:18 PM UTC

Hi Brandon , 
  
Question 
Solution 
Is there a way to unlink parent task duration with child task duration?
For example, I have the start date of my parent task on Mar 01 and end Date Mar 10
But if my child task has a start date of Mar 05 and end Date Mar 07 my parent task will use these dates
 
Yes, we have support to render the parent taskbar based on dates mapping in datasource . You can use TaskScheduling mode in Gantt. In Taskscheduling mode we have a property named manual which is used to render two taskbars for parent task one is a normal parent taskbar and another one is a thin line which is named as manual parent task situated on the top of the parent taskbar. The manual parent is rendered only when we map Ismanual property as true in the data source .otherwise normal parent taskbar alone rendered. Manual parent taskbar will be rendered based on the dates given in data source and normal parent taskbar will be rendered based on child taskbar dates. We have shared online documentation  for your reference. 
  
  
  
Code snippets: 
index.js 
  
  
this.taskFields = { 
            id: 'TaskID', 
            name: 'TaskName', 
            startDate: 'StartDate', 
            duration: 'Duration', 
            progress: 'Progress', 
            endDate: 'EndDate', 
            dependency: 'Predecessor', 
            child: 'Children', 
            manual: 'isManual' 
        }; 
Datasource.js 
  
TaskID: 1, 
    TaskName: 'Parent Task 1', 
    StartDate: new Date('02/27/2017'), 
    EndDate: new Date('03/02/2017'), 
    Progress: '40', 
    isManual: true, 
  
Please  contact us for further assistance  
  
Regards, 
Premkumar S 
Another question that I have is, is there a way to create tasks by clicking inside the gantt component in a specific date?  
We need time to validate whether the requirement is possible or not and will share further details within two business days on 9th March 2022. Until then we appreciate your patience. 
  
Regards, 
Premkumar S 



PS Premkumar Sudalaimuthu Syncfusion Team March 9, 2022 02:15 PM UTC

Hi Brandon , 
 
Question 
Solution 
Another question that I have is, is there a way to create tasks by clicking inside the gantt component in a specific date?   
Yes, we can able to add record by clicking the row using addRecord() method in rowSelected event . In the below sample we have add a records manually by passing the data source , row position and row index in  addRecord() method. Please refer to the below sample and code snippets for more reference. 
 
Code snippets: 
 
let data = { 
      TaskID: 10, 
      TaskName: 'New Added Task', 
      StartDate: new Date('04/02/2019'), 
      Duration: 4, 
      Progress: 50, 
    }; 
  } 
 
  rowSelected(args) { 
    this.ganttInstance.editModule.addRecord(this.data, 'Below', 2); 
  } 
 
 
 
 
 
Regards, 
Premkumar S 


Loader.
Up arrow icon