New to Telerik UI for WinFormsStart a free 30-day trial

Represents a base class for the different types of selections.

Definition

Namespace:Telerik.WinForms.Controls.Spreadsheet.Worksheets

Assembly:Telerik.WinControls.RadSpreadsheet.dll

Syntax:

C#
public abstract class SelectionBase

Inheritance: objectSelectionBase

Derived Classes: Selection

Properties

Gets the active range.

C#
public SelectionRange ActiveRange { get; }
Property Value:

The active range.

Gets the cells selection.

C#
public CellSelection Cells { get; }
Property Value:

The cells selection.

Gets the columns selection.

C#
public ColumnSelection Columns { get; }
Property Value:

The columns selection.

Gets the value defining if the selection is column selection.

C#
public bool IsColumnSelection { get; }
Property Value:

The value defining if the selection is column selection.

Gets the value defining if the selection is row selection.

C#
public bool IsRowSelection { get; }
Property Value:

The value defining if the selection is row selection.

Gets the value indicating if the selection is in progress.

C#
public bool IsSelectionInProgress { get; }
Property Value:

The value indicating if the selection is in progress.

Gets the rows selection.

C#
public RowSelection Rows { get; }
Property Value:

The rows selection.

Gets the selected ranges.

C#
public virtual IEnumerable<CellRange> SelectedRanges { get; }
Property Value:

The selected ranges.

Gets the selected ranges count.

C#
public int SelectedRangesCount { get; }
Property Value:

The selected ranges count.

Methods

Begins the update.

C#
public void BeginUpdate()

Determines whether the selection contains column.

C#
public bool ContainsColumn(int columnIndex)
Parameters:columnIndexint

Index of the column.

Returns:

bool

True if contains the column.

Determines whether the selection contains cell index.

C#
public bool ContainsIndex(CellIndex cellIndex)
Parameters:cellIndexCellIndex

Index of the cell.

Returns:

bool

True if contains the cell index.

Determines whether the selection contains cell position.

C#
public bool ContainsPosition(CellPosition cellPosition)
Parameters:cellPositionCellPosition

The cell position.

Returns:

bool

True if contains the position.

Determines whether the selection contains cell range.

C#
public bool ContainsRange(CellRange cellRange)
Parameters:cellRangeCellRange

The cell range.

Returns:

bool

True if contains the range.

Determines whether the selection contains row.

C#
public bool ContainsRow(int rowIndex)
Parameters:rowIndexint

Index of the row.

Returns:

bool

True if contains the row.

Ends the update.

C#
public void EndUpdate()

Checks if the the column intersects with the selection.

C#
public virtual bool IntersectsColumn(int columnIndex)
Parameters:columnIndexint

Index of the column.

Returns:

bool

True if intersects.

Checks if the the row intersects with the selection.

C#
public virtual bool IntersectsRow(int rowIndex)
Parameters:rowIndexint

Index of the row.

Returns:

bool

True if intersects.

Called when the selection is changed.

C#
protected virtual void OnSelectionChanged()

Raises the event.

C#
protected virtual void OnSelectionChanging(SelectionChangingEventArgs args)
Parameters:argsSelectionChangingEventArgs

The SelectionChangingEventArgs instance containing the event data.

Called when the selection changing is canceled.

C#
protected virtual void OnSelectionChangingCanceled()

Called on selection update.

C#
protected virtual void OnSelectionUpdate()

Selects the specified cell index.

C#
public void Select(CellIndex cellIndex, bool clearSelection = true)
Parameters:cellIndexCellIndex

Index of the cell.

clearSelectionbool

Defines if the old selection has to be cleared.

Selects range defined by the fromIndex and toIndex parameters.

C#
public void Select(CellIndex fromIndex, CellIndex toIndex, bool clearSelection = true)
Parameters:fromIndexCellIndex

From index of the range.

toIndexCellIndex

To index of the range.

clearSelectionbool

Defines if the old selection has to be cleared.

Selects the specified cell range.

C#
public void Select(CellRange cellRange, bool clearSelection = true)
Parameters:cellRangeCellRange

The cell range.

clearSelectionbool

Defines if the old selection has to be cleared.

Selects the specified cell range.

C#
public void Select(int fromRowIndex, int fromColumnIndex, int toRowIndex, int toColumnIndex, bool clearSelection = true)
Parameters:fromRowIndexint

From row index.

fromColumnIndexint

From column index.

toRowIndexint

To row index.

toColumnIndexint

To column index.

clearSelectionbool

Defines if the old selection has to be cleared.

Selects all.

C#
public void SelectAll()

Events

Occurs when the selection is changed.

C#
public event EventHandler SelectionChanged

Occurs when the selection is changing.

C#
public event EventHandler<SelectionChangingEventArgs> SelectionChanging

Occurs when the selection changing is canceled.

C#
public event EventHandler SelectionChangingCanceled

Occurs on selection update.

C#
public event EventHandler SelectionUpdate