Back to Devexpress

Grouping in Code

aspnetbootstrap-118809-grid-view-grouping-grouping-in-code.md

latest3.2 KB
Original Source

Grouping in Code

  • Feb 27, 2026
  • 2 minutes to read

This document consists of the following sections.

Server-Side Approach

To group data on the server, do one of the following:

To ungroup data, do one of the following:

The following methods allow you to manipulate group rows from server code:

MemberDescription
ASPxGridView.ExpandAllExpands all group rows.
ASPxGridView.ExpandRowExpands the specified group row.
ASPxGridView.CollapseAllCollapses all group rows.
ASPxGridView.CollapseRowCollapses the specified group row.

Client-Side Approach

To group data on the client, use the ASPxClientGridView.GroupBy method.

To ungroup data, call the ASPxClientGridView.UnGroup method.

To prevent grouping, handle the ASPxClientGridView.ColumnGrouping client event. The processed client column is identified by the event parameter’s column property. To cancel the operation, set the cancel property to true.

The following methods allow you to manipulate group rows from client code:

MemberDescription
ASPxClientGridView.ExpandAllExpands all group rows.
ASPxClientGridView.ExpandRowExpands the specified group row and optionally its child group rows at all nesting levels.
ASPxClientGridView.CollapseAllCollapses all group rows.
ASPxClientGridView.CollapseRowCollapses the specified group row and optionally its child group rows at all nesting levels.