SpreadsheetControl.BeforeGroupProcessing Event
Fires before the expand/collapse operation is executed for row or column groups in a worksheet.
Namespace: DevExpress.XtraSpreadsheet
Assembly: DevExpress.XtraSpreadsheet.v24.1.dll
NuGet Package: DevExpress.Win.Spreadsheet
Declaration
Event Data
The BeforeGroupProcessing event's data class is BeforeGroupProcessingEventArgs. The following properties provide information specific to this event:
Property | Description |
---|---|
Cancel | Gets or sets a value indicating whether the event should be canceled. Inherited from CancelEventArgs. |
IsRowGroup | Indicates whether the event is raised for row groups. |
Remarks
The WinForms Spreadsheet control ships with a set of events that allow you to control the expand/collapse operations for row and column groups in a worksheet.
The following events occur when a user clicks a plus / minus symbol on the outline bar (or the Hide Detail/Show Detail button on the Data ribbon tab):
BeforeGroupProcessing
- GroupStateChanging
- GroupStateChanged
- AfterGroupProcessing
The following events occur when a user clicks one of the outline buttons to expand/collapse row or column groups:
BeforeGroupProcessing
- BeforeOutlineButtonClick
- AfterOutlineButtonClick
- AfterGroupProcessing
The BeforeGroupProcessing
event fires before the expand/collapse operation starts. Enable the Cancel
property of the event data class to cancel the operation. The IsRowGroup property allows you to check the type of affected groups (row or column).
The following code snippet demonstrates how to prevent the expand/collapse operations for row groups in a worksheet:
spreadsheetControl1.BeforeGroupProcessing += (s, e) => {
if (e.IsRowGroup)
e.Cancel = true;
};