GridControl.GroupRowCollapsing Event
Occurs when a group row is about to be collapsed, allowing cancellation of the action.
Namespace: DevExpress.WinUI.Grid
Assembly: DevExpress.WinUI.Grid.v23.2.dll
NuGet Package: DevExpress.WinUI
#Declaration
public event RowAllowEventHandler GroupRowCollapsing
#Event Data
The GroupRowCollapsing event's data class is RowAllowEventArgs. The following properties provide information specific to this event:
Property | Description |
---|---|
Allow | Gets or sets whether to expand/collapse the group row. |
Row |
Gets the processed row.
Inherited from Row |
Row |
Gets the processed row’s handle.
Inherited from Row |
Source |
Gets the Grid |
#Remarks
The GroupRowCollapsing event is raised before a group row is collapsed by an end-user or in code, allowing you to cancel this action. The group row is identified by its handle via the RowHandle property. To prevent the group row from being collapsed, set the event parameter’s Allow parameter to false.
The GridControl.CollapseAllGroups method allows you to collapse all group rows. In this instance, the GroupRowCollapsing event is raised only once. The event parameter’s RowHandle property returns an invalid row handle (DataControlBase.InvalidRowHandle).
After the group row has been collapsed, the GridControl.GroupRowCollapsed event is raised.