GroupsOrder Property
See Also
- GridControl Control
- GridColumnOrder Object
- GridColumn Sortable Property
- GridColumn SortAscending Property

Description
A collection of GridColumns used to determine how the GridControl is grouped (i.e., first by column A in ascending order, then by column B in descending order, etc.).
Property Type
Read-only property
Syntax (Visual Basic)
Public Property GroupsOrder() As [GridColumnOrder](XtremeGridControl~GridColumnOrder.md)
Remarks
The order in which the columns are added to the collection of group columns determines the precedence. This is used to group the columns via code.
Column grouping order can be changed by simply dragging and dropping the column headers in the Group By box.
Example
Grouping columns in the GridControl (Visual Basic)
This sample illustrates how to group the columns in the GridControl. If you had 8 columns added to the GridControl, this sample would group the columns first by the column at ItemIndex 7 and then by the column at ItemIndex 2.
' This code below will add two columns to the GroupOrder collection of columns.
' This will cause the columns in the GridControl to first be grouped by column 7,
' which has an index of zero (0) in the GroupOrder collection. Columns are first grouped
' in the order that they are added to the GroupOrder collection.
wndGridControl.GroupsOrder.Add wndGridControl.Columns(7)
wndGridControl.GroupsOrder.Add wndGridControl.Columns(2)
' This will cause the column at index 0 of the GroupOrder collection to be displayed
' in descending order.
wndGridControl.GroupsOrder(0).SortAscending = False
See Also
- GridControl Control
- GridColumnOrder Object
- GridColumn Sortable Property
- GridColumn SortAscending Property
Copyright (c) 1998-2024 Codejock Technologies. All rights reserved.