Grouping in Code

  • 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:

Member Description
ASPxGridView.ExpandAll Expands all group rows.
ASPxGridView.ExpandRow Expands the specified group row.
ASPxGridView.CollapseAll Collapses all group rows.
ASPxGridView.CollapseRow Collapses 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:

Member Description
ASPxClientGridView.ExpandAll Expands all group rows.
ASPxClientGridView.ExpandRow Expands the specified group row and optionally child group rows at all nesting levels.
ASPxClientGridView.CollapseAll Collapses all group rows.
ASPxClientGridView.CollapseRow Collapses the specified group row and optionally child group rows at all nesting levels.