ComponentOne GanttView for WinForms
Step 3 of 4: Add Resources, Constraints, and Predecessors to the Tasks
GanttView for WinForms Quick Start > Step 3 of 4: Add Resources, Constraints, and Predecessors to the Tasks

In this step you will learn now to add resources, constraints, and predecessors to specific tasks.

To add resources to the project at design time:

  1. Right-click on the control and select Edit Resources.
    The C1GanttView.Resources Collection Editor appears.
  2. Click the Add button twice to add two resources to the collection.
  3. Set Resource 1 Name to Tim and Resource 2 Name to John.
  4. Click OK to save and close the C1GanttView.Resources Collection Editor.

To assign resources to specific tasks at design time:

  1. Right-click on the control and select Edit Tasks.
    The C1GanttView.Tasks Collection Editor appears.
  2. Select the Conception Approval task and click on the ellipsis button next to ResourceRefs.
    The Task.ResourceRefs Collection Editor appears.
  3. Click Add to add a reference to Tim.
  4. Set the Resource to Tim.
    If you wanted to assign more resources to that task you could click Add again to assign another resource.
  5. Click OK to save and close the Task.ResourceRefs Collection Editor.
  6. Select the Analysis and Design task and click on the ellipsis button next to ResourceRefs.
    The Task.ResourceRefs Collection Editor appears.
  7. Click Add to add a reference to John.
  8. Set the Resource to John.
  9. Click OK to save and close the Task.ResourceRefs Collection Editor.
    For more information on resources see Task Resources.

To add predecessors to the project at design time:

  1. Right-click on the control and select Edit Tasks.
    The C1GanttView.Tasks Collection Editor appears.
  2. Select the Requirements Set B task and click on the ellipsis button next to Predecessors.
    The Task.Predecessors Collection Editor appears.
  3. Click Add to add a predecessor.
  4. Set the Predecessor Task to Requirements Set A.
  5. Click OK to save and close the Task.Predecessors Collection Editor.
  6. Select the Requirements Set Ctask and click on the ellipsis button next to Predecessors.
    The Task.Predecessors Collection Editor appears.
  7. Click Add to add a predecessor.
  8. Set the Predecessor Task to Requirements Set B.
  9. Set the PredecessorType to FinishToStart.
  10. 10.  Click OK to save and close the Task.Predecessors Collection Editor.
    For more information on predecessors see Creating Predecessors.

To add constraints to the project at design time:

  1. Right-click on the control and select Edit Tasks.
    The C1GanttView.Tasks Collection Editor appears.
  2. Select the Requirements task and set the ConstraintType to StartNoEarlierThan.
  3. Set the ConstraintDate to 7/4/2012.
  4. Select the Analysis and Design task and set the ConstraintType to MustStartOn.
  5. Set the ConstraintDate to 7/10/2012.
  6. Click OK to save and close the C1GanttView.Tasks Collection Editor.
    For more information on constraints see Task Constraints.
See Also