Skip to main content

GridView.GroupRowCollapsed Event

Fires immediately after a group row has been collapsed.

Namespace: DevExpress.XtraGrid.Views.Grid

Assembly: DevExpress.XtraGrid.v24.1.dll

NuGet Packages: DevExpress.Win.Grid, DevExpress.Win.Navigation

Declaration

[DXCategory("Behavior")]
public event RowEventHandler GroupRowCollapsed

Event Data

The GroupRowCollapsed event's data class is RowEventArgs. The following properties provide information specific to this event:

Property Description
RowHandle Gets the row’s handle (position). For the ColumnView.RowUpdated event, this property specifies the previous handle (position) of the currently processed row. NewItemRowHandle value when a new row is added.

Remarks

This event is raised after a row has been collapsed by an end-user or via code. Note that it provides a notification only and you cannot cancel the action. To control whether individual rows can be collapsed, handle the GridView.GroupRowCollapsing event instead.

Group rows can be collapsed recursively via the GridView.SetRowExpanded method overload with the recursive parameter set to true. In this case, the GroupRowCollapsed event is raised only once (for the row passed as this method’s parameter). For nesting rows, this event is not raised.

This event is also called after all group rows have been collapsed at the same time (via a group panel context menu or GridView.CollapseAllGroups method). In this case, the RowEventArgs.RowHandle parameter is set to GridControl.InvalidRowHandle.

Please refer to the Working with Groups in Code topic for additional information.

See Also