Back to Devexpress

GridView.GroupRowCollapsed Event

windowsforms-devexpress-dot-xtragrid-dot-views-dot-grid-dot-gridview-a0c213a9.md

latest3.7 KB
Original Source

GridView.GroupRowCollapsed Event

Fires immediately after a group row has been collapsed.

Namespace : DevExpress.XtraGrid.Views.Grid

Assembly : DevExpress.XtraGrid.v25.2.dll

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

Declaration

csharp
[DXCategory("Behavior")]
public event RowEventHandler GroupRowCollapsed
vb
<DXCategory("Behavior")>
Public Event GroupRowCollapsed As RowEventHandler

Event Data

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

PropertyDescription
RowHandleGets 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

GroupRowCollapsing

GroupRowExpanded

GroupRowExpanding

SetRowExpanded

Data Grouping

Working with Groups in Code

GridView Class

GridView Members

DevExpress.XtraGrid.Views.Grid Namespace