Skip to main content
A newer version of this page is available. .

Expanding and Collapsing Group Rows

End-users can expand or collapse group rows by clicking group buttons.

To identify whether a group row is expanded, use the ASPxGridView.IsRowExpanded method.

Expanding Group Rows

You can use the ASPxGridViewBehaviorSettings.AutoExpandAllGroups to control whether all group rows displayed within ASPxGridView are automatically expanded after each grouping operation. This makes all data rows visible within the grid after a group operation.

To expand a group row in code, use the ASPxGridView.ExpandRow server method, or the ASPxClientGridView.ExpandRow client method. To expand all group rows, use the ASPxGridView.ExpandAll server method, or the ASPxClientGridView.ExpandAll client method.

Before expanding a group row, the client ASPxGridView raises the ASPxClientGridView.RowExpanding event, allowing you to prevent the group row from being expanded.

Collapsing Group Rows

Use the ASPxGridView.CollapseRow server method or the ASPxClientGridView.CollapseRow client row to collapse a group row. To collapse all expanded group rows, use the ASPxGridView.CollapseAll server method, or the ASPxClientGridView.CollapseAll client method.

Before a group row is collapsed, the client ASPxGridView raises the ASPxClientGridView.RowCollapsing event, allowing you to prevent the group row from being collapsed.