GridControl.GroupRowExpanding Event
Occurs when a group row is about to be expanded, allowing cancellation of the action.
Namespace: DevExpress.WinUI.Grid
Assembly: DevExpress.WinUI.Grid.v23.2.dll
NuGet Package: DevExpress.WinUI
#Declaration
public event RowAllowEventHandler GroupRowExpanding
#Event Data
The GroupRowExpanding 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 GroupRowExpanding event is raised before a group row is expanded 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 expanded, set the event parameter’s Allow parameter to false.
The GridControl.ExpandAllGroups method allows you to expand all group rows. In this instance, the GroupRowExpanding event is raised only once. The event parameter’s RowHandle property returns an invalid row handle (DataControlBase.InvalidRowHandle).
After the group row has been expanded, the GridControl.GroupRowExpanded event is raised.