Back to Devexpress

DataSourceColumnBinding.GroupInterval Property

wpf-devexpress-dot-xpf-dot-pivotgrid-dot-datasourcecolumnbinding-dcbafa8d.md

latest12.1 KB
Original Source

DataSourceColumnBinding.GroupInterval Property

Gets or sets how the values are combined into groups.

Namespace : DevExpress.Xpf.PivotGrid

Assembly : DevExpress.Xpf.PivotGrid.v25.2.dll

NuGet Package : DevExpress.Wpf.PivotGrid

Declaration

csharp
public FieldGroupInterval GroupInterval { get; set; }
vb
Public Property GroupInterval As FieldGroupInterval

Property Value

TypeDescription
FieldGroupInterval

A FieldGroupInterval enumeration that specifies how the values are combined into groups.’

|

Available values:

Show 26 items

NameDescription
Default

Groups combine unique field values.

| | Date |

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

Field values are grouped by the date part. The time part of the values is ignored.

| | DateDay |

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

Field values are grouped by the day part. The following groups can be created: 1 , 2 , 3 ,…, 31.

| | DateDayOfWeek |

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

Field values are grouped by the days of the week. Examples of such groups: Sunday , Monday , Tuesday (the actual names of the days of the week are determined by the current culture).

| | DateDayOfYear |

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

Field values are grouped by the number of the day in which they occur in a year. The following groups can be created: 1, 2, 3,…,365 (,366 in a leap year).

| | DateWeekOfMonth |

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

Field values are grouped by the number of the week in which they occur in a month. The following groups can be created: 1, 2, 3, 4 and 5. The first week is the week containing the 1st day of the month.

| | DateWeekOfYear |

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

Field values are grouped by the number of the week in a year in which they occur. The following groups can be created: 1, 2, 3,…,52, 53.

| | DateMonth |

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

Field values are grouped by the month part. Examples of groups: January , February , March (the actual names of the months are determined by the current culture).

| | DateQuarter |

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

Field values are sorted by the quarterly intervals of the year. The following groups can be created: 1 , 2 , 3 and 4. Each quarter includes three months.

| | DateYear |

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

Field values are grouped by the year part. Examples of such groups: 2003, 2004, 2005.

| | YearAge |

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

Field values are grouped by the number of full years that have elapsed till the current date. The lengths of groups is determined by the PivotGridField.GroupIntervalNumericRange property.

| | MonthAge |

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

Field values are grouped by the number of full months that have elapsed till the current date. The lengths of groups is determined by the PivotGridField.GroupIntervalNumericRange property.

| | WeekAge |

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

Field values are grouped by the number of full weeks that have elapsed till the current date. The lengths of groups is determined by the PivotGridField.GroupIntervalNumericRange property.

| | DayAge |

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

Field values are grouped by the number of full days that have elapsed till the current date. The lengths of groups is determined by the PivotGridField.GroupIntervalNumericRange property.

| | Alphabetical |

Combines field values into categories according to the character that the values start with.

| | Numeric |

This option is in effect only for fields that store numeric values.

Field values are grouped into intervals as defined by the PivotGridField.GroupIntervalNumericRange property.

| | Hour |

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

Field values are grouped by the hour part, regardless of the date to which the current date/time value belongs.

| | Custom |

Enables combining the field’s data into custom intervals via the PivotGridControl.CustomGroupInterval event.

Not supported in OLAP mode.

| | Minute |

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

Field values are grouped by the minute part, regardless of the date to which the current date/time value belongs.

| | Second |

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

Field values are grouped by the second part, regardless of the date to which the current date/time value belongs.

| | DateMonthYear |

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

Field values are grouped by the date part. Examples of groups: 3/4/2012, 3/5/2012, 3/6/2012, …

| | DateQuarterYear |

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

Field values are grouped by the year and quarter. Examples of groups: Q3 2012, Q4 2012, Q1 2013, Q2 2013, …

| | DateHour |

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

Field values are grouped by the date part with the hour value. Examples of such groups: 3/4/2012 0:00, 3/4/2012 1:00, 3/4/2012 2:00, …

| | DateHourMinute |

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

Field values are grouped by the date part with the hour and minute values. Examples of groups: 3/4/2012 0:00, 3/4/2012 0:01, 3/4/2012 0:02, …

| | DateHourMinuteSecond |

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

Field values are grouped by the date part with the hour, minute and second values. Examples of groups: 3/4/2012 0:00:00, 3/4/2012 0:00:01, 3/4/2012 0:00:02, …

| | DateWeekYear |

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

Field values are grouped by the date of the first day of the week (uses culture settings). Examples of such groups: 7/1/2018, 7/8/2018, 7/15/2018.

|

The following code snippets (auto-collected from DevExpress Examples) contain references 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.

wpf-pivotgrid-how-to-display-underlying-data-asynchronously/CS/WpfDrillDownDataSourceExample/MainWindow.xaml#L47

xml
<dxpg:PivotGridField.DataBinding>
    <dxpg:DataSourceColumnBinding ColumnName="OrderDate" GroupInterval="Date"/>
</dxpg:PivotGridField.DataBinding>

wpf-pivot-grid-add-custom-field-values-rows-columns-not-present-in-datasource/CS/WpfApplication1/MainWindow.xaml#L25

xml
<dxpg:PivotGridField.DataBinding>
    <dxpg:DataSourceColumnBinding ColumnName="Date" GroupInterval="DateYear"/>
</dxpg:PivotGridField.DataBinding>

wpf-pivotgrid-how-to-display-underlying-data/CS/WpfDrillDownDataSourceExample/MainWindow.xaml#L47

xml
<dxpg:PivotGridField.DataBinding>
    <dxpg:DataSourceColumnBinding ColumnName="OrderDate" GroupInterval="Date"/>
</dxpg:PivotGridField.DataBinding>

wpf-pivotgrid-customize-the-cell-template/CS/HowToCustomizeCellTemplate/MainWindow.xaml#L24

xml
<dxpg:PivotGridField.DataBinding>
    <dxpg:DataSourceColumnBinding ColumnName="OrderDate" GroupInterval="DateYear"/>
</dxpg:PivotGridField.DataBinding>

wpf-pivot-grid-apply-format-conditions-to-data-cells/CS/WpfPivotGridConditionalFormatting/MainWindow.xaml#L53

xml
<dxpg:PivotGridField.DataBinding>
    <dxpg:DataSourceColumnBinding ColumnName="OrderDate" GroupInterval="DateYear"/>
</dxpg:PivotGridField.DataBinding>

wpf-pivot-grid-bind-to-an-mdb-database/CS/HowToBindToMDB/MainWindow.xaml.cs#L39

csharp
DataBinding orderDateBinding = pivotGridControl1.Fields["OrderDate"].DataBinding;
(orderDateBinding as DataSourceColumnBinding).GroupInterval = FieldGroupInterval.DateYear;

wpf-pivot-grid-show-top-n-values-in-context-menu/CS/ContextMenuToShowTopN_Example/MainWindow.xaml.cs#L43

csharp
pivotGridControl1.Fields["OrderDate"].Area = FieldArea.ColumnArea;
    (pivotGridControl1.Fields["OrderDate"].DataBinding as DataSourceColumnBinding).GroupInterval = FieldGroupInterval.DateYear;
}

wpf-pivot-grid-bind-to-an-mdb-database/VB/HowToBindToMDB/MainWindow.xaml.vb#L35

vb
Dim orderDateBinding As DataBinding = pivotGridControl1.Fields("OrderDate").DataBinding
TryCast(orderDateBinding, DataSourceColumnBinding).GroupInterval = FieldGroupInterval.DateYear
pivotGridControl1.EndUpdate()

wpf-pivot-grid-show-top-n-values-in-context-menu/VB/ContextMenuToShowTopN_Example/MainWindow.xaml.vb#L40

vb
pivotGridControl1.Fields("OrderDate").Area = FieldArea.ColumnArea
    DirectCast(pivotGridControl1.Fields("OrderDate").DataBinding, DataSourceColumnBinding).GroupInterval = FieldGroupInterval.DateYear
End Sub

See Also

DataSourceColumnBinding Class

DataSourceColumnBinding Members

DevExpress.Xpf.PivotGrid Namespace