SpreadsheetControl.ActiveSheet Property
Gets the sheet that is currently displayed in the SpreadsheetControl.
Namespace: DevExpress.XtraSpreadsheet
Assembly: DevExpress.XtraSpreadsheet.v24.2.dll
Declaration
Property Value
Type | Description |
---|---|
Sheet | A Sheet descendant that specifies the active worksheet or chart sheet. |
Remarks
The ActiveSheet property is useful when you need to obtain an active sheet in a workbook containing both worksheets and chart sheets. To get the type of the active sheet, use the Sheet.SheetType property.
You can use one of the following properties to specify an active sheet in code:
- WorksheetCollection.ActiveWorksheet - gets or sets the currently active worksheet within a workbook;
- ChartSheetCollection.ActiveChartSheet - gets or sets the currently active chart sheet within a workbook;
- SheetCollection.ActiveSheet - gets or sets the currently active sheet (a worksheet or chart sheet) within a workbook.
An end-user can switch between sheets using the SpreadsheetControl’s Sheet Tab Selector. Before and after an active sheet is changed via the control’s UI, the SpreadsheetControl.ActiveSheetChanging and SpreadsheetControl.ActiveSheetChanged events are raised, respectively.