Skip to main content

GridSortInfoCollection.GroupByColumn(String, Int32, ColumnSortOrder) 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.v14.2.dll

#Declaration

public void GroupByColumn(
    string fieldName,
    int index,
    ColumnSortOrder sortOrder = ColumnSortOrder.Ascending
)

#Parameters

Name Type Description
fieldName String

A String value that specifies the field name of the column by whose values data is grouped.

index Int32

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

#Optional Parameters

Name Type Default Description
sortOrder ColumnSortOrder

1

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

#Remarks

To learn more, see Grouping in Code.

See Also