GroupOn

GroupOn enumeration

Specifies the type of grouping.

public enum GroupOn

Values

NameValueDescription
DateDay13Group on date by day.
DateEachValue10Group on date for each value.
DateHour12Group on date by hour.
DateMinute11Group on date by minute.
DateMonth16Group on date by month.
DateQtr17Group on date by quarter.
DateThirdOfMonth15Group on date by each third of a month.
DateWeek14Group on date by week.
DateYear18Group on date by year.
DurationDays23Group on duration by days.
DurationEachValue20Group on duration for each value.
DurationHours22Group on duration by hours.
DurationMinutes21Group on duration by minutes.
DurationMonths25Group on duration by months.
DurationWeeks24Group on duration by weeks.
EachValue0Group by each value.
Interval1Group by the interval.
OutlineEachValue30Group on each outline value.
OutlineLevel31Group on the outline level.
Pct11045Group by 10 percent completion increments.
Pct12544Group by 25 percent completion increments.
Pct15043Group by 50 percent completion increments.
Pct19942Group by 99 percent completion.
PctEachValue40Group on percent of each value.
PctInterval41Group on the interval percent.
TextEachValue50Group on each text value.
TextPrefix51Group on the text prefix.

Examples

Shows how to work with a group criterion.

var project = new Project(DataDir + "ReadGroupDefinitionData.mpp");

Console.WriteLine("Task Groups Count: " + project.TaskGroups.Count);
var group = project.TaskGroups.ToList()[1];
Console.WriteLine("Task Group Name: " + group.Name);
Console.WriteLine("Task Group Criteria count: " + group.GroupCriteria.Count);

Console.WriteLine("\n************* Retrieving Task Group's Criterion information *************");
var criterion = group.GroupCriteria.ToList()[0];
Console.WriteLine("Task Criterion Index: " + criterion.Index);
Console.WriteLine("Task Criterion Field: " + criterion.Field);
Console.WriteLine("Task Criterion GroupOn: " + criterion.GroupOn);
Console.WriteLine("Task Criterion Cell Color: " + criterion.CellColor);
Console.WriteLine("Task Criterion Font Color: " + criterion.FontColor);
Console.WriteLine("Task Criterion Group Interval: " + criterion.GroupInterval);
Console.WriteLine("Task Criterion Start At: " + criterion.StartAt);

// read the background pattern of the criterion  
Console.WriteLine("Task Criterion Pattern: " + criterion.Pattern);

if (group == criterion.ParentGroup)
{
    Console.WriteLine("Parent Group is equal to task Group.");
}

Console.WriteLine("\n*********** Retrieving Criterion's Font Information ***********");
Console.WriteLine("Font Name: " + criterion.Font.FontFamily);
Console.WriteLine("Font Size: " + criterion.Font.Size);
Console.WriteLine("Font Style: " + criterion.Font.Style);
Console.WriteLine("Ascending/Descending: " + criterion.Ascending);

See Also