GridViewDataColumn.GroupBy() Method

Groups data by the values of the current column.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v20.2.dll


public void GroupBy()


The ASPxGridView supports grouping data by an unlimited number of data columns. To group data by the values of a given column, call its GroupBy method. Calling this method has no effect if data is already grouped by the values of this column. If several columns are involved in grouping, the current column will reside at the bottom grouping level after calling its GroupBy method.

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

To ungroup data by the values of a single column, use the column's GridViewDataColumn.UnGroup method.

Data grouping is allowed if the ASPxGridViewBehaviorSettings.AllowGroup and ASPxGridBehaviorSettings.AllowSort properties are set to true.

See Also