Back to Devexpress

PivotField.GroupItems(PivotGroupingValue, PivotGroupingValue, Double, PivotFieldGroupByType) Method

officefileapi-devexpress-dot-spreadsheet-dot-pivotfield-dot-groupitems-x28-pivotgroupingvalue-pivotgroupingvalue-double-pivotfieldgroupbytype-x29.md

latest6.2 KB
Original Source

PivotField.GroupItems(PivotGroupingValue, PivotGroupingValue, Double, PivotFieldGroupByType) Method

Performs field grouping using the specified grouping properties.

Namespace : DevExpress.Spreadsheet

Assembly : DevExpress.Spreadsheet.v25.2.Core.dll

NuGet Package : DevExpress.Spreadsheet.Core

Declaration

csharp
void GroupItems(
    PivotGroupingValue startValue,
    PivotGroupingValue endValue,
    double interval,
    PivotFieldGroupByType groupBy
)
vb
Sub GroupItems(
    startValue As PivotGroupingValue,
    endValue As PivotGroupingValue,
    interval As Double,
    groupBy As PivotFieldGroupByType
)

Parameters

NameTypeDescription
startValuePivotGroupingValue

A PivotGroupingValue object that specifies the starting value.

| | endValue | PivotGroupingValue |

A PivotGroupingValue object that specifies the ending value.

| | interval | Double |

A Double value that specifies the grouping interval for numeric range grouping or the number of days to group by in date range grouping.

| | groupBy | PivotFieldGroupByType |

A PivotFieldGroupByType enumeration value or a combination of values that specifies the grouping.

|

Remarks

Use this method to apply grouping parameters obtained with the PivotField.GroupingInfo property of another grouped pivot field.

The following code snippets (auto-collected from DevExpress Examples) contain references to the GroupItems(PivotGroupingValue, PivotGroupingValue, Double, PivotFieldGroupByType) method.

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-spreadsheet-pivot-table-api-examples/CS/SpreadsheetWPFPivotTableExamples/CodeExamples/PivotFieldGroupingActions.cs#L58

csharp
// Group field items from 0 to 150 by 10.
field.GroupItems(0, 150, 10, PivotFieldGroupByType.NumericRanges);
#endregion #GroupFieldByNumericRanges

winforms-spreadsheet-pivot-table-api/CS/SpreadsheetPivotTableExamples/CodeExamples/PivotFieldGroupingActions.cs#L58

csharp
// Group field items from 1000 to 4000 by 1000.
field.GroupItems(1000, 4000, 1000, PivotFieldGroupByType.NumericRanges);
#endregion #GroupFieldByNumericRanges

spreadsheet-document-api-pivot-table-examples/CS/SpreadsheetDocServerPivotAPI/CodeExamples/PivotFieldGroupingActions.cs#L64

csharp
// Group field items from 1000 to 4000 by 1000.
field.GroupItems(1000, 4000, 1000, PivotFieldGroupByType.NumericRanges);
#endregion #GroupFieldByNumericRanges

wpf-spreadsheet-pivot-table-api-examples/VB/SpreadsheetWPFPivotTableExamples/CodeExamples/PivotFieldGroupingActions.vb#L53

vb
' Group field items from 0 to 150 by 10.
            field.GroupItems(0, 150, 10, PivotFieldGroupByType.NumericRanges)
' #End Region ' #GroupFieldByNumericRanges

winforms-spreadsheet-pivot-table-api/VB/SpreadsheetPivotTableExamples/CodeExamples/PivotFieldGroupingActions.vb#L53

vb
' Group field items from 1000 to 4000 by 1000.
            field.GroupItems(1000, 4000, 1000, PivotFieldGroupByType.NumericRanges)
' #End Region ' #GroupFieldByNumericRanges

spreadsheet-document-api-pivot-table-examples/VB/SpreadsheetDocServerPivotAPI/CodeExamples/PivotFieldGroupingActions.vb#L59

vb
' Group field items from 1000 to 4000 by 1000.
            field.GroupItems(1000, 4000, 1000, PivotFieldGroupByType.NumericRanges)
#End Region ' #GroupFieldByNumericRanges

See Also

PivotField Interface

PivotField Members

DevExpress.Spreadsheet Namespace