Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

GridControl.GroupBy(GridColumn, ColumnSortOrder, Int32, Boolean) Method

Groups data by the values of the specified column with the specified sort order. If several columns are involved in grouping, the specified column will reside at the specified grouping level.

Namespace: DevExpress.Xpf.Grid

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

NuGet Package: DevExpress.Wpf.Grid.Core

#Declaration

public void GroupBy(
    GridColumn column,
    ColumnSortOrder sortedOrder,
    int groupedIndex,
    bool mergeWithPreviousGroup = false
)

#Parameters

Name Type Description
column GridColumn

A GridColumn object that represents the column by whose values data is grouped.

sortedOrder ColumnSortOrder

A ColumnSortOrder enumeration value that specifies the column’s sort order.

groupedIndex Int32

A zero-based integer value that specifies the grouping level. If negative, an exception is raised.

#Optional Parameters

Name Type Default Description
mergeWithPreviousGroup Boolean False

A boolean value that specifies whether the current grouping should be merged with a previous grouping (according to group index).

#Remarks

To learn more, see Grouping.

See Also