Class
SelectionState

Captures the current selection state in a worksheet, including selected cell ranges, active cell, viewport pane, and selected shapes.

Definition

Namespace:Telerik.Windows.Documents.Spreadsheet.Model

Assembly:Telerik.Windows.Documents.Spreadsheet.dll

Syntax:

cs-api-definition
public class SelectionState

Inheritance: objectSelectionState

Constructors

SelectionState(IEnumerable<CellRange>, CellIndex, ViewportPaneType)

Initializes a new SelectionState with the specified selected ranges, active cell, and viewport pane.

Declaration

cs-api-definition
public SelectionState(IEnumerable<CellRange> selectedRanges, CellIndex activeCellIndex, ViewportPaneType pane)

Parameters

selectedRanges

IEnumerable<CellRange>

The selected ranges.

activeCellIndex

CellIndex

Index of the active cell.

pane

ViewportPaneType

The pane.

Properties

ActiveCellIndex

Gets the index of the active cell, which receives keyboard input and is the focus point for selection operations.

Declaration

cs-api-definition
public CellIndex ActiveCellIndex { get; }

Property Value

CellIndex

The index of the active cell.

Pane

Gets the viewport pane where the selection is located, relevant when the worksheet has frozen panes.

Declaration

cs-api-definition
public ViewportPaneType Pane { get; }

Property Value

ViewportPaneType

The pane.

SelectedRanges

Gets the collection of cell ranges currently selected in the worksheet.

Declaration

cs-api-definition
public IEnumerable<CellRange> SelectedRanges { get; }

Property Value

IEnumerable<CellRange>

The selected ranges.

Methods

Clone()

Creates a deep copy of this selection state.

Declaration

cs-api-definition
public SelectionState Clone()

Returns

SelectionState

The cloned selection state.

ToString()

Returns a string representation of this selection state, including pane, active cell, and selected ranges.

Declaration

cs-api-definition
public override string ToString()

Returns

string

A string that represents the current object.

Overrides object.ToString()