Moving all connected tasks at once preserving dependencies offset

Hi,

Is there a way of moving all connected tasks (changing their start and end dates respectively) when a task is dragged (or its start and end dates are changed in another way)? In other words, we'd like to preserve dependencies' offset once they are added to the chart.

Thanks.

3 Replies

LG Logeswari Gopalakrishnan Syncfusion Team May 29, 2020 11:58 AM UTC

Hi Dmitry, 
 
We have analyzed your query and by default while move taskbar ,its all connected tasks are moved automatically. It is our default behavior . please confirm us is this your requirement or explain your query with more details.  
 
We have attached video for query you asked. Please find the below link. 
 
 
Regards, 
Logeswari G 



DV Dmitry Vorobyev May 29, 2020 12:54 PM UTC

Thank you for your answer. Sorry I forgot to mention that, accordingly to https://www.syncfusion.com/forums/154616/set-non-zero-offset-for-a-dependency-to-avoid-moving-tasks , we have set

<GanttComponent id='Editing'   
  //... 
  enablePredecessorValidation ={false}>          
GanttComponent> 

I think this is the reason why we lost the ability to move the tasks all at once.

So essentially the requirements are as follows:

  1. When two tasks are being connected, do not move them, but set the dependency's offset to a certain value (that's what enablePredecessorValidation ={false} caters for).
  2. But when one of connected tasks is being moved, move them all at once preserving the dependencies' offsets.
Is this scenario possible?

Thanks!


LG Logeswari Gopalakrishnan Syncfusion Team June 1, 2020 04:01 PM UTC

Hi Dmitry, 
  
Yes, it is possible to move connected task on taskbar editing actions by setting isInPredecessorValidation as true in taskbarEditing event. Please find the below code snippet. 
  
<GanttComponent id='Editing' ref={gantt => this.ganttInstance = gantt}  
taskbarEditing={this.taskbarEditingEvent.bind(this)}> 
…//// 
</GanttComponent> 
  
this.taskbarEditingEvent = function (args) {  
         this.ganttInstance.isInPredecessorValidation = true; 
        }; 
  
Please find the below sample link. 
  
  
Please let us know if you need further details on this. 
  
Regards, 
Logeswari G 


Loader.
Up arrow icon