Skip to main content

GridControl.GroupBy(String, Boolean) Method

Groups data by the values of the specified column.

Namespace: DevExpress.Xpf.Grid

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


public void GroupBy(
    string fieldName,
    bool mergeWithPreviousGroup = false


Name Type Description
fieldName String

A String value that specifies the column’s field name.

Optional Parameters

Name Type Default Description
mergeWithPreviousGroup Boolean


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


The GridControl supports data grouping by an unlimited number of columns. The GroupBy method groups data by the values of the specified column.

Data rows are always sorted against the grouping columns. If data is grouped against a column which isn’t sorted, the grid automatically applies sorting in ascending order to this column.

To learn more, see Grouping.

See Also