SpreadsheetControl.SelectedCell Property
Gets or sets an active cell in the active worksheet. This is a dependency property.
Namespace: DevExpress.Xpf.Spreadsheet
Assembly: DevExpress.Xpf.Spreadsheet.v19.1.dll
Declaration
Property Value
Type | Description |
---|---|
Range | A Range object specifying an active cell in a worksheet that is currently active. If you assign a cell located in a worksheet that is not active, the active cell will be specified in the active worksheet. |
Remarks
The SpreadsheetControl.ActiveCell property enables you to obtain an active cell, i.e., the cell that is in focus. It is the cell with which the user interacts.
The SelectedCell property returns the Range object that is the active cell of the current worksheet. However, unlike the SpreadsheetControl.ActiveCell property, it enables you to set the active cell by specifying the Range. The top left cell of the specified range becomes the selected cell.
The SpreadsheetControl.Selection property provides access to a cell range selected in the active worksheet. If there is more than one selected range in the worksheet, this property returns a complex (union) range that includes all the selected areas. You can access an individual range in the selection by its index in the Range.Areas collection.
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the SelectedCell property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.