SelectionBase
Represents a base class for the different types of selections.
Definition
Namespace:Telerik.Windows.Controls.Spreadsheet.Worksheets
Assembly:Telerik.Windows.Controls.Spreadsheet.dll
Syntax:
public abstract class SelectionBase
Inheritance: objectSelectionBase
Derived Classes:
Properties
Gets the active range.
public SelectionRange ActiveRange { get; }
The active range.
Cells
CellSelection
Gets the cells selection.
public CellSelection Cells { get; }
The cells selection.
Columns
ColumnSelection
Gets the columns selection.
public ColumnSelection Columns { get; }
The columns selection.
Gets the value defining if the selection is column selection.
public bool IsColumnSelection { get; }
The value defining if the selection is column selection.
Gets the value defining if the selection is row selection.
public bool IsRowSelection { get; }
The value defining if the selection is row selection.
Gets the value indicating if the selection is in progress.
public bool IsSelectionInProgress { get; }
The value indicating if the selection is in progress.
Rows
RowSelection
Gets the rows selection.
public RowSelection Rows { get; }
The rows selection.
SelectedRanges
IEnumerable<CellRange>
Gets the selected ranges.
public virtual IEnumerable<CellRange> SelectedRanges { get; }
The selected ranges.
Gets the selected ranges count.
public int SelectedRangesCount { get; }
The selected ranges count.
Methods
Begins the update.
public void BeginUpdate()
Determines whether the selection contains cell index.
public bool ContainsIndex(CellIndex cellIndex)
Index of the cell.
Returns:True if contains the cell index.
Determines whether the selection contains cell position.
public bool ContainsPosition(CellPosition cellPosition)
The cell position.
Returns:True if contains the position.
Determines whether the selection contains cell range.
public bool ContainsRange(CellRange cellRange)
The cell range.
Returns:True if contains the range.
Ends the update.
public void EndUpdate()
Called when the selection is changed.
protected virtual void OnSelectionChanged()
Raises the event.
protected virtual void OnSelectionChanging(SelectionChangingEventArgs args)
The SelectionChangingEventArgs instance containing the event data.
Called when the selection changing is canceled.
protected virtual void OnSelectionChangingCanceled()
Called on selection update.
protected virtual void OnSelectionUpdate()
Selects the specified cell index.
public void Select(CellIndex cellIndex, bool clearSelection = true)
Index of the cell.
clearSelectionboolDefines if the old selection has to be cleared.
Selects range defined by the fromIndex and toIndex parameters.
public void Select(CellIndex fromIndex, CellIndex toIndex, bool clearSelection = true)
From index of the range.
toIndexCellIndexTo index of the range.
clearSelectionboolDefines if the old selection has to be cleared.
Selects the specified cell range.
public void Select(CellRange cellRange, bool clearSelection = true)
The cell range.
clearSelectionboolDefines if the old selection has to be cleared.
Selects the specified cell range.
public void Select(int fromRowIndex, int fromColumnIndex, int toRowIndex, int toColumnIndex, bool clearSelection = true)
From row index.
fromColumnIndexintFrom column index.
toRowIndexintTo row index.
toColumnIndexintTo column index.
clearSelectionboolDefines if the old selection has to be cleared.
Selects all.
public void SelectAll()
Events
Occurs when the selection is changed.
public event EventHandler SelectionChanged
Occurs when the selection is changing.
public event EventHandler<SelectionChangingEventArgs> SelectionChanging
Occurs when the selection changing is canceled.
public event EventHandler SelectionChangingCanceled
Occurs on selection update.
public event EventHandler SelectionUpdate