ComponentOne GanttView for WinForms
Step 2 of 4: Add Tasks to the Project
GanttView for WinForms Quick Start > Step 2 of 4: Add Tasks to the Project

In this step you learn how to create regular tasks, milestones, and set the duration of the tasks.

To add tasks 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 first member from the list, member[0] and enter a name next to the Name property such as, Project Management.
  3. Set the Mode to Automatic. For more information on Automatic tasks see Task Mode.
  4. Set Days to 30.
  5. Select the second member from the list, member[1] and enter a name next to the Name property such as, Conception Approval.
  6. Set Start to 7/2/2012 and Finish to 7/10/2012.
  7. Set the Mode to Automatic.
  8. Set the PercentComplete to 100%. For more information see Task Percent Complete.
  9. Select the third member from the list, member[2] and enter a name next to the Name property such as, Refine the System.
  10. Set Start to 7/4/2012 and Finish to 7/31/2012.
  11. Select the fourth member from the list, member[3] and enter a name next to the Name property such as, Requirements Set A.
  12. Set Start to 7/18/2012 and Finish to 7/23/2012.
  13. Select the fifth member from the list, member[4] and enter a name next to the Name property such as, Requirements Set B.
  14. Set Start to 7/23/2012 and Finish to 7/27/2012.
  15. Select the sixth member from the list, member[5] and enter a name next to the Name property such as, Requirements Set C.
  16. Set Start to 7/20/2012 and Finish to 7/23/2012.
  17. Select the seventh member from the list, member[6] and enter a name next to the Name property such as, Analysis and Design.
  18. Set Start to 7/10/2012 and Finish to 7/30/2012.
  19. Set the Mode to Automatic.
  20. Select the eighth member from the list, member[7] and enter a name next to the Name property such as, Completion Review.
  21. Set Start to 7/31/2012 and Finish to 7/31/2012.
  22. Click OK to save and close the C1GanttView.Tasks Collection Editor.

Run and observe the following:

  1. Run your project and drag the grey splitter bar over to the left to expand the chartview area.
  2. Notice the Automatic scheduled tasks, Project Management and Conception/Approval have a different bar color than the remaining tasks which are Manual.
  3. As you scroll along the chartview area notice the vertical orange line represents today’s date.
    The color can be modified using the TodayLineColor property. For more information see C1GanttView Appearance Properties.
  4. Scroll along the chartview area and notice the two vertical dotted silver lines to indicate the project start/finish dates.
    The color can be modified using the StartFinishLineColor property. For more information see C1GanttView Appearance Properties.
  5. Hover over each task bar and notice a tooltip appears with the task’s summary.

  6. Locate the diamond shaped bar in the chartview area.
    This task represents a milestone. Notice by default the Finish date is displayed to the right of the bar.

In the next step you will learn how to add resources, constraints, and predecessors to the tasks.

See Also