Grouping enables you to put data into groups wherein the elements share some common attributes. In GanttView, you can build an outline tree using the grouping feature where each group task is a summary task and all its children may have the same property values.

The following Group models are provided:
- Task Mode: Group the tasks by TaskMode property.
- Duration: Group the tasks by Duration property.
- Milestones: Group the tasks by two groups: milestone or not milestone.
- Resource: Group the tasks by their ResourceNames string.
- Status: Group the task by their PercentComplete and ProgressLine.
- ConstraintType: Group the task by their ConstraintType.
- Clear Group: Clear the group view, reset the gantt chart to regular view.
- New Group By: Invoke the Group form to advance group.
- Maintain Hierarchy: To show/hide the hierarchical structure in group view.
Create Groups
To implement the grouping feature, you can create a base group by using the BaseGroup class for the column according to which data is to be grouped. You can also select the type of group model to be created.
Use the below code snippet to create a group.
BaseGroup baseGroup = new C1.Win.C1GanttView.DurationGroup(true);
c1GanttView1.Group(baseGroup);
c1GanttView1.GroupDefinition.MaintainHierarchy = true;
Create Advance Groups
You can even create a group view that contains two layers of group, known as advance group.
To create a Advance group, follow the steps below:
- Open the Group form by selecting New Group from Group Menu.
- Fill the Group Type, Field Name, and Order for each group task.
You can add any number of group models, the blank group model will automatically be added below the last group model in Group form each time you’re done with creating the new group model.