ASPxGridView.GetGroupedColumns() Method
Returns a collection of grouped columns.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v24.2.dll
Declaration
Returns
Type | Description |
---|---|
ReadOnlyCollection<GridViewDataColumn> | The collection of grouped columns. |
Remarks
ASPxGridView supports data grouping by multiple columns. Call the GetGroupedColumns
method to access the collection of grouped columns.
For more information on grouping in the grid, refer to the following topic: ASPxGridView - Group Data.
The code sample below uses the GetGroupedColumns
method to traverse through the grouped columns and sort them in descending order.
<dx:ASPxGridView ID="grid" runat="server" OnCustomCallback="grid_CustomCallback">
<%--...--%>
<Settings ShowGroupPanel="true" />
</dx:ASPxGridView>
protected void grid_CustomCallback(object sender, ASPxGridViewCustomCallbackEventArgs e) {
var collection = grid.GetGroupedColumns();
foreach(var item in collection) {
item.SortDescending();
}
}
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the GetGroupedColumns() method.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.