SpreadsheetControl.BeforeGroupProcessing Event
Fires before the expand/collapse operation is executed for row or column groups in a worksheet.
Namespace: DevExpress.Xpf.Spreadsheet
Assembly: DevExpress.Xpf.Spreadsheet.v24.2.dll
NuGet Package: DevExpress.Wpf.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 WPF 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:
spreadsheetControl.BeforeGroupProcessing += (s, e) => {
if (e.IsRowGroup)
e.Cancel = true;
};