10744 : I have use two layers in every gantt row, how can I sync movement of time items?

Question

I have use two layers in every gantt row. One layer for showing task timeitem and other for progress timeitem together with no. of days of progress label value in that time item. Now the problem is that if i move timeitem of first layer in same row at right side, I also want to move timeitem of second layer so that it takes start time of timeitem of first layer. Also how to retrieve start time of timeitem of one layer when the user resize the timeitem of another layer.

Answer

Many possible ways. The best solution is to use a Invisble time item link and set up a TimeItemLinkAction with the value SameStart, that will fix it.

Sample showing how to set up some LinkActions:

      gantt1.Grid.RootNodes[2].GetCell(0).Content.Value=“Third row, use link action, and invisible link”;
      gr=GanttRow.FromGridNode(gantt1.Grid.RootNodes[2]);
      til1=gantt1.TimeItemLinks.AddLink(gr.Layers[0][0],gr.Layers[0][1]);
      til2=gantt1.TimeItemLinks.AddLink(gr.Layers[0][1],gr.Layers[0][2]);
     
      til1.Action=TimeItemLinkAction.PushForward;
      til2.Action=TimeItemLinkAction.PushForward;     
      til1.TimeItemLinkDrawStyle=TimeItemLinkDrawStyle.Invisible;
      til2.TimeItemLinkDrawStyle

Leave a Reply