skip navigation
  • Product Bundles

    DevCraft

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

    • NEW: Design Kits for Figma
    • Online Training
    • Document Processing Library
    • Embedded Reporting for web and desktop

    Web

    Kendo UI UI for jQuery UI for Angular UI for React UI for Vue 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 Test Studio Dev Edition Telerik JustMock

    CMS

    Sitefinity

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    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 SchedulerSelectionBehavior

Performs selection operations and provides information about the current selection of cells and appointments in RadScheduler. The cell selection in RadScheduler represents a single date interval - it has SelectionStartDate and SelectionEndDate. A few other parameters help to fully identify the current selection - IsAllDayAreaSelection, SelectedResourceId, CurrentCell. There are two modes for appointment selection - single selection and multi selection. Use the AllowAppointmentsMultiSelect property of RadScheduler to switch between them.

Inheritance
System.Object
SchedulerSelectionBehavior
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.WinControls.UI
Assembly: Telerik.WinControls.Scheduler.dll

Syntax

public class SchedulerSelectionBehavior

Constructors

SchedulerSelectionBehavior(RadScheduler)

Creates a the selection behavior for the specified RadScheduler.

Declaration
public SchedulerSelectionBehavior(RadScheduler scheduler)
Parameters
RadScheduler scheduler

The scheduler this behavior belongs to.

Fields

selectedAppointmentsList

Declaration
protected List<IEvent> selectedAppointmentsList
Field Value
System.Collections.Generic.List<IEvent>

Properties

CurrentCell

Gets or sets the coordinates of the current cell. The current cell is the start cell that will be used when performing navigation with the arrow keys.

Declaration
public TableLayoutPanelCellPosition CurrentCell { get; set; }
Property Value
System.Windows.Forms.TableLayoutPanelCellPosition

CurrentCellElement

Gets the SchedulerCellElement which stands on the coordinates provided by the CurrentCell property.

Declaration
public SchedulerCellElement CurrentCellElement { get; }
Property Value
SchedulerCellElement

HasAppointmentsSelected

Gets a value indicating whether there is any appointment selected.

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

HasCellsSelected

Gets a value indicating whether there is any cell selected.

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

IsAllDayAreaSelection

Gets a value indicating whether the current selection is within the AllDay area of the SchedulerDayViewElement.

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

Scheduler

The RadScheduler this behavior belongs to.

Declaration
public RadScheduler Scheduler { get; }
Property Value
RadScheduler

SelectedAppointment

Gets the last selected appointment.

Declaration
public IEvent SelectedAppointment { get; }
Property Value
IEvent

SelectedAppointmentElement

Gets the AppointmentElement which represents the selected appointment.

Declaration
public AppointmentElement SelectedAppointmentElement { get; }
Property Value
AppointmentElement

SelectedAppointments

Gets a read-only list which contains the currently selected appointments.

Declaration
public ReadOnlyCollection<IEvent> SelectedAppointments { get; }
Property Value
System.Collections.ObjectModel.ReadOnlyCollection<IEvent>

SelectedResourceId

Gets the id of the resource which contains the current selection.

Declaration
public EventId SelectedResourceId { get; }
Property Value
EventId

SelectionEndDate

Gets the end date of the current selection range. The value of the property can be less that the value of SelectionStartRange. Derived classes can set a value.

Declaration
public DateTime SelectionEndDate { get; protected set; }
Property Value
System.DateTime

SelectionStartDate

Gets the start date of the current selection range. The value of the property can be greater that the value of SelectionEndRange. Derived classes can set a value.

Declaration
public DateTime SelectionStartDate { get; protected set; }
Property Value
System.DateTime

Methods

GetCellDuration()

Gets the logical duration of a cell in the current view. For example: the duration of an AllDay cell will be 1 day and the duration of a cell in day view with the default ScaleFactor will be 60 minutes.

Declaration
public virtual TimeSpan GetCellDuration()
Returns
System.TimeSpan

The durration of a cell in the current view.

GetSelectedInterval()

Gets the date-time interval that is currently selected. If SelectionStartDate is greater than SelectionEndDate, the method will swap the values and will always return an interval in which the Start is less than or equal to the End.

Declaration
public DateTimeInterval GetSelectedInterval()
Returns
DateTimeInterval

IsAppointmentSelected(IEvent)

Returns a value indicating whether an appointment is in the current selection.

Declaration
public virtual bool IsAppointmentSelected(IEvent appointment)
Parameters
IEvent appointment

The appointment.

Returns
System.Boolean

[true] if the appointment is selected, [false] otherwise.

IsCellSelected(SchedulerCellElement)

Returns a value indicating whether a cell element is selected.

Declaration
public virtual bool IsCellSelected(SchedulerCellElement cell)
Parameters
SchedulerCellElement cell

The cell element.

Returns
System.Boolean

[true] if the cell is selected, [false] otherwise.

IsDateSelected(DateTime, TimeSpan, EventId, Boolean)

Returns a value indicating whether a cell with specified parameters is currently selected.

Declaration
public virtual bool IsDateSelected(DateTime date, TimeSpan duration, EventId resourceId, bool isAllDayAreaCell)
Parameters
System.DateTime date

The Date of the cell.

System.TimeSpan duration

The Duration of the cell.

EventId resourceId

The ResourceId of the cell.

System.Boolean isAllDayAreaCell

A value indicating whether this is an AllDay cell.

Returns
System.Boolean

[true] if the cell is selected, [false] otherwise.

ResetAppointmentSelection()

Clears the current appointment selection.

Declaration
public virtual void ResetAppointmentSelection()

ResetCellSelection()

Clears the current cell selection.

Declaration
public virtual void ResetCellSelection()

ResetSelection()

Clears both appointment selection and cell selection.

Declaration
public void ResetSelection()

SelectAppointment(IEvent, Boolean)

Selects a given appointment.

Declaration
public virtual void SelectAppointment(IEvent appointment, bool extend)
Parameters
IEvent appointment

The appointment to select.

System.Boolean extend

Indicates whether the appointment should be added to the current selection or not. If this argument is true and the appointment is already selected, it will be deselected. This argument has no effect if AllowAppointmentsMultiSelect is false.

SelectCell(SchedulerCellElement)

Selects a given cell element. Selecting a cell will reset the appointment selection.

Declaration
public void SelectCell(SchedulerCellElement cell)
Parameters
SchedulerCellElement cell

The cell element to select.

SelectCell(SchedulerCellElement, Boolean)

Selects a given cell element. Selecting a cell will reset the appointment selection.

Declaration
public virtual void SelectCell(SchedulerCellElement cell, bool extendSelection)
Parameters
SchedulerCellElement cell

The cell element to select.

System.Boolean extendSelection

Indicates whether only the specified cell should be selected or the selection should be extended as if you were holding the Shift key.

SelectDateRange(DateTime, DateTime)

Selects all cells in a specified range.

Declaration
public virtual void SelectDateRange(DateTime startDate, DateTime endDate)
Parameters
System.DateTime startDate

The start date of the range.

System.DateTime endDate

The end date of the range.

SelectDateRange(DateTime, DateTime, EventId)

Selects all cells in a specified range.

Declaration
public virtual void SelectDateRange(DateTime startDate, DateTime endDate, EventId resourceId)
Parameters
System.DateTime startDate

The start date of the range.

System.DateTime endDate

The end date of the range.

EventId resourceId

The id of the resource in which the selection should be performed.

UnselectAppointment(IEvent)

Removes an appointment from the current selection.

Declaration
public virtual void UnselectAppointment(IEvent appointment)
Parameters
IEvent appointment

The appointment to unselect.

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.