SelectionBase
Represents a base class for the different types of selections.
Definition
Namespace:Telerik.WinForms.Controls.Spreadsheet.Worksheets
Assembly:Telerik.WinControls.RadSpreadsheet.dll
Syntax:
public abstract class SelectionBase
Inheritance: objectSelectionBase
Derived Classes:
Properties
Gets the active range.
public SelectionRange ActiveRange { get; }
The active range.
Gets the cells selection.
public CellSelection Cells { get; }
The cells selection.
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.
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 position.
public bool ContainsPosition(CellPosition cellPosition)
The cell position.
Returns:True if contains the position.
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 range defined by the fromIndex and toIndex parameters.
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