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 server ASPxGridView.ExpandRow method, or the client ASPxClientGridView.ExpandRow method. To expand all group rows, use the server ASPxGridView.ExpandAll method, or the client ASPxClientGridView.ExpandAll 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 server ASPxGridView.CollapseRow method or the ASPxClientGridView.CollapseRow client row to collapse a group row. To collapse all expanded group rows, use the server ASPxGridView.CollapseAll method, or the client ASPxClientGridView.CollapseAll 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.