GridSortInfoCollection.GroupByColumn(String, Int32, ColumnSortOrder, MergeGroupPosition, Boolean) Method
Groups data by the values of the specified column.
Namespace: DevExpress.Xpf.Grid
Assembly: DevExpress.Xpf.Grid.v24.2.dll
NuGet Package: DevExpress.Wpf.Grid.Core
#Declaration
public void GroupByColumn(
string fieldName,
int index,
ColumnSortOrder sortOrder = ColumnSortOrder.Ascending,
MergeGroupPosition mergeGroupPosition = MergeGroupPosition.None,
bool refreshMerge = true
)
#Parameters
Name | Type | Description |
---|---|---|
field |
String | A String value that specifies the column’s field name. |
index | Int32 | An integer value that specifies the column’s position among grouping columns. |
#Optional Parameters
Name | Type | Default | Description |
---|---|---|---|
sort |
Column |
Ascending | A Column |
merge |
Merge |
None | A Merge |
refresh |
Boolean | True | A Boolean value that specifies whether the merged column should or not change the Grid |
#Remarks
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 in Code.
Note
The refresh