skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • AI Coding Assistants
    • Embedded Reporting
    • Document Processing Libraries
    • SSO Account Sign-in

    Web

    Kendo UI UI for Angular UI for Vue UI for jQuery KendoReact UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Telerik JustMock

    CMS

    Sitefinity

    AI Productivity Tools

    AI Coding Assistants

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    KendoReact Free VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Support and Learning

    • Support and Learning Hub
    • First Steps
    • Docs
    • Demos
    • Virtual Classroom
    • Forums
    • Videos
    • Blogs
    • Accessibility
    • Submit a Ticket

    Productivity and Design Tools

    • Visual Studio Extensions
    • Visual Studio Templates
    • Embedded Reporting
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class SelectionBase

Represents a base class for the different types of selections.

Inheritance
System.Object
SelectionBase
Selection
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Telerik.WinForms.Controls.Spreadsheet.Worksheets
Assembly: Telerik.WinControls.RadSpreadsheet.dll

Syntax

public abstract class SelectionBase

Properties

ActiveRange

Gets the active range.

Declaration
public SelectionRange ActiveRange { get; }
Property Value
SelectionRange

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
System.Boolean

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
System.Boolean

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
System.Boolean

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
System.Collections.Generic.IEnumerable<CellRange>

The selected ranges.

SelectedRangesCount

Gets the selected ranges count.

Declaration
public int SelectedRangesCount { get; }
Property Value
System.Int32

The selected ranges count.

Methods

BeginUpdate()

Begins the update.

Declaration
public void BeginUpdate()

ContainsColumn(Int32)

Determines whether the selection contains column.

Declaration
public bool ContainsColumn(int columnIndex)
Parameters
System.Int32 columnIndex

Index of the column.

Returns
System.Boolean

True if contains the column.

ContainsIndex(CellIndex)

Determines whether the selection contains cell index.

Declaration
public bool ContainsIndex(CellIndex cellIndex)
Parameters
CellIndex cellIndex

Index of the cell.

Returns
System.Boolean

True if contains the cell index.

ContainsPosition(CellPosition)

Determines whether the selection contains cell position.

Declaration
public bool ContainsPosition(CellPosition cellPosition)
Parameters
CellPosition cellPosition

The cell position.

Returns
System.Boolean

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
System.Boolean

True if contains the range.

ContainsRow(Int32)

Determines whether the selection contains row.

Declaration
public bool ContainsRow(int rowIndex)
Parameters
System.Int32 rowIndex

Index of the row.

Returns
System.Boolean

True if contains the row.

EndUpdate()

Ends the update.

Declaration
public void EndUpdate()

IntersectsColumn(Int32)

Checks if the the column intersects with the selection.

Declaration
public virtual bool IntersectsColumn(int columnIndex)
Parameters
System.Int32 columnIndex

Index of the column.

Returns
System.Boolean

True if intersects.

IntersectsRow(Int32)

Checks if the the row intersects with the selection.

Declaration
public virtual bool IntersectsRow(int rowIndex)
Parameters
System.Int32 rowIndex

Index of the row.

Returns
System.Boolean

True if intersects.

OnSelectionChanged()

Called when the selection is changed.

Declaration
protected virtual void OnSelectionChanged()

OnSelectionChanging(SelectionChangingEventArgs)

Raises the SelectionChanging event.

Declaration
protected virtual void OnSelectionChanging(SelectionChangingEventArgs args)
Parameters
SelectionChangingEventArgs 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(Int32, Int32, Int32, Int32, Boolean)

Selects the specified cell range.

Declaration
public void Select(int fromRowIndex, int fromColumnIndex, int toRowIndex, int toColumnIndex, bool clearSelection = true)
Parameters
System.Int32 fromRowIndex

From row index.

System.Int32 fromColumnIndex

From column index.

System.Int32 toRowIndex

To row index.

System.Int32 toColumnIndex

To column index.

System.Boolean clearSelection

Defines if the old selection has to be cleared.

Select(CellIndex, Boolean)

Selects the specified cell index.

Declaration
public void Select(CellIndex cellIndex, bool clearSelection = true)
Parameters
CellIndex cellIndex

Index of the cell.

System.Boolean clearSelection

Defines if the old selection has to be cleared.

Select(CellIndex, CellIndex, Boolean)

Selects range defined by the fromIndex and toIndex parameters.

Declaration
public void Select(CellIndex fromIndex, CellIndex toIndex, bool clearSelection = true)
Parameters
CellIndex fromIndex

From index of the range.

CellIndex toIndex

To index of the range.

System.Boolean clearSelection

Defines if the old selection has to be cleared.

Select(CellRange, Boolean)

Selects the specified cell range.

Declaration
public void Select(CellRange cellRange, bool clearSelection = true)
Parameters
CellRange cellRange

The cell range.

System.Boolean clearSelection

Defines if the old selection has to be cleared.

SelectAll()

Selects all.

Declaration
public void SelectAll()

Events

SelectionChanged

Occurs when the selection is changed.

Declaration
public event EventHandler SelectionChanged
Event Type
System.EventHandler

SelectionChanging

Occurs when the selection is changing.

Declaration
public event EventHandler<SelectionChangingEventArgs> SelectionChanging
Event Type
System.EventHandler<SelectionChangingEventArgs>

SelectionChangingCanceled

Occurs when the selection changing is canceled.

Declaration
public event EventHandler SelectionChangingCanceled
Event Type
System.EventHandler

SelectionUpdate

Occurs on selection update.

Declaration
public event EventHandler SelectionUpdate
Event Type
System.EventHandler

Extension Methods

SvgExtentions.Traverse<T>(T, Func<T, IEnumerable<T>>)
SvgExtentions.TraverseDepthFirst<T>(T, Func<T, IEnumerable<T>>)
Getting Started
  • Install Now
  • Demos
  • Step-by-Step Tutorial
  • Sample Applications
  • SDK Samples
  • Visual Studio Extensions
Support Resources
  • Code Library
  • Knowledge Base
  • Videos
Community
  • Forums
  • Blogs
  • Feedback Portal
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.