Skip to main content
A newer version of this page is available. .

GridColumn.GroupInterval Property

Gets or sets how data rows are grouped when grouping by this column is applied. This is a dependency property.

Namespace: DevExpress.Xpf.Grid

Assembly: DevExpress.Xpf.Grid.v18.2.dll

Declaration

[DefaultValue(ColumnGroupInterval.Default)]
public ColumnGroupInterval GroupInterval { get; set; }

Property Value

Type Default Description
ColumnGroupInterval **Default**

A ColumnGroupInterval enumeration value that specifies how data rows are grouped.

Available values:

Name Description
Default

For columns which store date/time values, this option is the same as the ColumnGroupInterval.Date option. For non date/time columns this option is the same as the ColumnGroupInterval.Value option.

Value

Rows are grouped by values of grouping columns. The number of groups matches the number of unique values within the grouping column.

For date/time columns, both the date and time portions are taken into account for value comparison. To specify how date/time values are presented in group rows in WinForms Data Grid, apply formatting to the grouping column (e.g., with the GridColumn.DisplayFormat property).

Date

This option is in effect only for columns that store date/time values.

Rows are grouped by the date part of their values, the time portion is ignored in this grouping mode.

DateMonth

This option is in effect only for columns that store date/time values.

Rows are grouped by the month part of their values.

DateYear

This option is in effect only for columns that store date/time values.

Rows are grouped by the year part of their values.

DateRange

This option is in effect only for columns that store date/time values.

Rows are grouped into the following groups according to their date value as compared with the current system date: “Today”, “Tomorrow”, “Sunday”, “Monday”, “Tuesday”, “Wednesday”, “Thursday”, “Friday”, “Saturday”, “Next Week”, “Two Weeks Away”, “Three Weeks Away”, “Next Month”, “Beyond Next Month”, “Yesterday”, “Last Week”, “Two Weeks Ago”, “Three Weeks Ago”, “Last Month”, “Older”.

Alphabetical

Rows are grouped by the character that grouping column values start with.

Note

Not supported in server mode for numeric and date/time columns.

DisplayText

Rows are grouped by display values of the grouping column.

In specific instances, column cells can have different edit values, but the same display value. To combine these rows into the same group, use the DisplayText group mode.

Note

Not supported in server mode.

Remarks

The Interval Grouping feature allows you to change the default logic, especially for columns that contain date/time values. For example, data rows can be arranged by the month or year part of a date/time value, while text columns can be grouped by the first characters. To specify the required grouping mode, use the column’s GroupInterval property.

IntervalGrouping

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the GroupInterval property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also