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 via mouse.

Expanding and Collapsing Group Rows

Expanding Group Rows

To expand a group row, use the GridControl.ExpandGroupRow method. A group row is specified by its handle. To expand the focused group row, use the GridViewBase.ExpandFocusedRow method. All group rows can be expanded using the GridControl.ExpandAllGroups method.

Before a group row is expanded, the GridControl.GroupRowExpanding event is raised, allowing you to cancel the action. For instance, you can prevent an end-user from expanding individual group rows. After a group row has been expanded, the GridControl.GroupRowExpanded event is raised.

To identity whether a group row is expanded, use the GridControl.IsGroupRowExpanded method.

Collapsing Group Rows

To collapse the specified group row, use the GridControl.CollapseGroupRow method. To collapse the focused group row, use the GridViewBase.CollapseFocusedRow method. All group rows can be collapsed using the GridControl.CollapseAllGroups method.

Before a group row is collapsed, the GridControl.GroupRowCollapsing event is raised, allowing you to cancel the action. After a group row has been collapsed, the GridControl.GroupRowCollapsed event is raised.