ClassSelectionBase
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
ActiveRange
Gets the active range.
Declaration
public SelectionRange ActiveRange { get; }
Property Value
The active range.
Cells
Gets the cells selection.
Declaration
public CellSelection Cells { get; }
Property Value
CellSelection
The cells selection.
Columns
Gets the columns selection.
Declaration
public ColumnSelection Columns { get; }
Property Value
ColumnSelection
The columns selection.
IsColumnSelection
Gets the value defining if the selection is column selection.
Declaration
public bool IsColumnSelection { get; }
Property Value
The value defining if the selection is column selection.
IsRowSelection
Gets the value defining if the selection is row selection.
Declaration
public bool IsRowSelection { get; }
Property Value
The value defining if the selection is row selection.
IsSelectionInProgress
Gets the value indicating if the selection is in progress.
Declaration
public bool IsSelectionInProgress { get; }
Property Value
The value indicating if the selection is in progress.
Rows
Gets the rows selection.
Declaration
public RowSelection Rows { get; }
Property Value
RowSelection
The rows selection.
SelectedRanges
Gets the selected ranges.
Declaration
public virtual IEnumerable<CellRange> SelectedRanges { get; }
Property Value
IEnumerable<CellRange>
The selected ranges.
SelectedRangesCount
Gets the selected ranges count.
Declaration
public int SelectedRangesCount { get; }
Property Value
The selected ranges count.
Methods
ContainsColumn(int)
Determines whether the selection contains column.
ContainsIndex(CellIndex)
Determines whether the selection contains cell index.
Declaration
public bool ContainsIndex(CellIndex cellIndex)
Parameters
cellIndex
CellIndex
Index of the cell.
Returns
True if contains the cell index.
ContainsPosition(CellPosition)
Determines whether the selection contains cell position.
Declaration
public bool ContainsPosition(CellPosition cellPosition)
Parameters
cellPosition
The cell position.
Returns
True if contains the position.
ContainsRange(CellRange)
Determines whether the selection contains cell range.
Declaration
public bool ContainsRange(CellRange cellRange)
Parameters
cellRange
CellRange
The cell range.
Returns
True if contains the range.
ContainsRow(int)
Determines whether the selection contains row.
IntersectsColumn(int)
Checks if the the column intersects with the selection.
IntersectsRow(int)
Checks if the the row intersects with the selection.
OnSelectionChanged()
Called when the selection is changed.
Declaration
protected virtual void OnSelectionChanged()
OnSelectionChanging(SelectionChangingEventArgs)
Raises the event.
Declaration
protected virtual void OnSelectionChanging(SelectionChangingEventArgs args)
Parameters
args
The SelectionChangingEventArgs instance containing the event data.
OnSelectionChangingCanceled()
Called when the selection changing is canceled.
Declaration
protected virtual void OnSelectionChangingCanceled()
OnSelectionUpdate()
Called on selection update.
Declaration
protected virtual void OnSelectionUpdate()
Select(CellIndex, CellIndex, bool)
Selects range defined by the fromIndex and toIndex parameters.
Declaration
public void Select(CellIndex fromIndex, CellIndex toIndex, bool clearSelection = true)
Parameters
fromIndex
CellIndex
From index of the range.
toIndex
CellIndex
To index of the range.
clearSelection
Defines if the old selection has to be cleared.
Select(CellIndex, bool)
Selects the specified cell index.
Declaration
public void Select(CellIndex cellIndex, bool clearSelection = true)
Parameters
cellIndex
CellIndex
Index of the cell.
clearSelection
Defines if the old selection has to be cleared.
Select(CellRange, bool)
Selects the specified cell range.
Declaration
public void Select(CellRange cellRange, bool clearSelection = true)
Parameters
cellRange
CellRange
The cell range.
clearSelection
Defines if the old selection has to be cleared.
Select(int, int, int, int, bool)
Selects the specified cell range.
Declaration
public void Select(int fromRowIndex, int fromColumnIndex, int toRowIndex, int toColumnIndex, bool clearSelection = true)
Parameters
fromRowIndex
From row index.
fromColumnIndex
From column index.
toRowIndex
To row index.
toColumnIndex
To column index.
clearSelection
Defines if the old selection has to be cleared.
Events
SelectionChanged
Occurs when the selection is changed.
SelectionChanging
Occurs when the selection is changing.
Declaration
public event EventHandler<SelectionChangingEventArgs> SelectionChanging
Event Value
SelectionChangingCanceled
Occurs when the selection changing is canceled.
Declaration
public event EventHandler SelectionChangingCanceled
Event Value
SelectionUpdate
Occurs on selection update.