Skip to main content

Selection

  • 2 minutes to read

The SchedulerControl allows you to access the appointments, time cells or resources an end-user selected.

Select and Deselect Appointments

The SchedulerControl.SelectedAppointments property provides access to the selected appointments collection. To select an appointment, add it to the collection, to deselect - remove it from the collection.

Obtain Selected Appointments

Use the SchedulerControl.SelectedAppointments property to retrieve the selected appointments collection.

View Example: Obtain Selected Appointment, Resource, and Time Interval

<ScrollViewer Grid.Row="0" VerticalScrollBarVisibility="Auto">
    <ItemsControl ItemsSource="{DXBinding '@e(schedulerControl).SelectedAppointments'}">
        <ItemsControl.ItemTemplate>
            <DataTemplate>
                <TextBox Background="Beige" Text="{Binding Subject}" />
            </DataTemplate>
        </ItemsControl.ItemTemplate>
    </ItemsControl>
</ScrollViewer>

Obtain Selected Time Interval and Resource

Use the SchedulerControl.SelectedInterval property to retrieve the time cells interval selected by an end-user. When selecting an appointment, this property returns the interval this appointment occupies.

The SchedulerControl.SelectedResource property provides access to the resource related to the selected time interval.

You can change the selected time interval by moving the selection in the desired direction. Call the corresponding view‘s MoveSelection method to complete the task.

View Example: Obtain Selected Appointment, Resource, and Time Interval

Bind Selection to the Source

Use the following properties to bind the selected appointments and resources to the source objects in MVVM architecture:

Selection in the User Interface

End-users can select a particular date, specific appointment, a date or time cell range, and a range of appointments. The table below lists all available actions:

Action Effect
Click any date in the Scheduler (if the currently active view is set to either the Week View or Month View) Selects a day
Click and drag across the time cells (in the Week View or Month View only). Selects a continuous date range. Does not change the selected range in the DateNavigator control (if it is provided).
Clicking the mouse Selects a time cell
Clicking and dragging the mouse Selects a continuous time cell range
Pressing the SHIFT+ARROW KEY combination. Allows end-users to select a continuous time cell range. Note that this clears a previous cell selection
Click any appointment in the Scheduler Selects an appointment
Click appointments while pressing the SHIFT or CTRL key Selects multiple appointments

Tip

Use the SchedulerControl.AllowAppointmentMultiSelect property to restrict selecting multiple appointments.