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 Selection

Represents the selection.

Inheritance
System.Object
SelectionBase
Selection
Inherited Members
SelectionBase.BeginUpdate()
SelectionBase.EndUpdate()
SelectionBase.Select(Int32, Int32, Int32, Int32, Boolean)
SelectionBase.Select(CellIndex, Boolean)
SelectionBase.Select(CellRange, Boolean)
SelectionBase.Select(CellIndex, CellIndex, Boolean)
SelectionBase.SelectAll()
SelectionBase.ContainsIndex(CellIndex)
SelectionBase.ContainsPosition(CellPosition)
SelectionBase.ContainsRange(CellRange)
SelectionBase.ContainsRow(Int32)
SelectionBase.ContainsColumn(Int32)
SelectionBase.OnSelectionUpdate()
SelectionBase.OnSelectionChanging(SelectionChangingEventArgs)
SelectionBase.OnSelectionChangingCanceled()
SelectionBase.SelectedRanges
SelectionBase.SelectedRangesCount
SelectionBase.IsSelectionInProgress
SelectionBase.ActiveRange
SelectionBase.IsRowSelection
SelectionBase.IsColumnSelection
SelectionBase.Cells
SelectionBase.Rows
SelectionBase.Columns
SelectionBase.SelectionUpdate
SelectionBase.SelectionChanging
SelectionBase.SelectionChanged
SelectionBase.SelectionChangingCanceled
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 class Selection : SelectionBase, IWeakEventListener

Properties

ActiveCell

Gets the active cell selection.

Declaration
public CellSelection ActiveCell { get; }
Property Value
CellSelection

The active cell selection.

ActiveCellIndex

Gets the index of the active cell.

Declaration
public CellIndex ActiveCellIndex { get; }
Property Value
CellIndex

The index of the active cell.

ActiveCellMode

Gets or sets the active cell mode.

Declaration
public ActiveCellMode ActiveCellMode { get; set; }
Property Value
ActiveCellMode

The active cell mode.

CurrentRegion

Gets the region that contains the active cell.

Declaration
public CellRange CurrentRegion { get; }
Property Value
CellRange

IsCellSelection

Gets or sets the value indicating whether the active selection is cell selection or shape selection.

Declaration
public bool IsCellSelection { get; }
Property Value
System.Boolean

The value returned is true if the active selection is cell selection and false if it is shape selection.

Shapes

Gets the selected shapes.

Declaration
public ShapeSelection Shapes { get; }
Property Value
ShapeSelection

The selected shapes.

Methods

CreateSelectionState()

Creates the selection state.

Declaration
public SelectionState CreateSelectionState()
Returns
SelectionState

The selection state.

EnsureDisplayMode()

Ensures the display mode.

Declaration
public void EnsureDisplayMode()

IntersectsColumn(Int32)

Checks if the the column intersects with the selection.

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

Index of the column.

Returns
System.Boolean

True if intersects.

Overrides
SelectionBase.IntersectsColumn(Int32)

IntersectsRow(Int32)

Checks if the the row intersects with the selection.

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

Index of the row.

Returns
System.Boolean

True if intersects.

Overrides
SelectionBase.IntersectsRow(Int32)

OnActiveCellModeChanged()

Called when the active cell mode is changed.

Declaration
protected virtual void OnActiveCellModeChanged()

OnSelectionChanged()

Called when the selection is changed.

Declaration
protected override void OnSelectionChanged()
Overrides
SelectionBase.OnSelectionChanged()

ReceiveWeakEvent(Type, Object, EventArgs)

Receives events from the centralized event manager.

Declaration
public bool ReceiveWeakEvent(Type managerType, object sender, EventArgs e)
Parameters
System.Type managerType

The type of the System.Windows.WeakEventManager calling this method.

System.Object sender

Object that originated the event.

System.EventArgs e

Event data.

Returns
System.Boolean

true if the listener handled the event. It is considered an error by the System.Windows.WeakEventManager handling in WPF to register a listener for an event that the listener does not handle. Regardless, the method should return false if it receives an event that it does not recognize or handle.

RestoreSelectionState(SelectionState)

Restores the selection state.

Declaration
public void RestoreSelectionState(SelectionState selectionState)
Parameters
SelectionState selectionState

State of the selection.

Select(IEnumerable<FloatingShapeBase>, Boolean)

Selects the specified shapes.

Declaration
public void Select(IEnumerable<FloatingShapeBase> shapes, bool clearSelection = true)
Parameters
System.Collections.Generic.IEnumerable<FloatingShapeBase> shapes

The shapes.

System.Boolean clearSelection

Defines if the old selection has to be cleared.

Select(FloatingShapeBase, Boolean)

Selects the specified shape.

Declaration
public void Select(FloatingShapeBase shape, bool clearSelection = true)
Parameters
FloatingShapeBase shape

The shape.

System.Boolean clearSelection

Defines if the old selection has to be cleared.

SelectActiveCell()

Selects the active cell.

Declaration
public void SelectActiveCell()

Events

ActiveCellModeChanged

Occurs when the active cell mode is changed.

Declaration
public event EventHandler ActiveCellModeChanged
Event Type
System.EventHandler

SelectionTypeChanged

Occurs when the selection type is changed between cell selection and shape selection.

Declaration
public event EventHandler SelectionTypeChanged
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.