Skip to main content
A newer version of this page is available. .

SchedulerViewBase.SetSelection(TimeInterval, Resource) Method

Selects time cells which encompass the specified time interval.

Namespace: DevExpress.Xpf.Scheduler

Assembly: DevExpress.Xpf.Scheduler.v20.2.dll

NuGet Packages: DevExpress.WindowsDesktop.Wpf.Scheduler, DevExpress.Wpf.Scheduler

Declaration

public virtual void SetSelection(
    TimeInterval interval,
    Resource resource
)

Parameters

Name Type Description
interval TimeInterval

A TimeInterval object that specifies the time interval to select.

resource Resource

A Resource object that specifies to which resource the specified time interval belongs.

Remarks

Important

You are viewing documentation for the legacy WPF Scheduler control. If you’re starting a new project, we strongly recommend that you use a new control declared in the DevExpress.Xpf.Scheduling namespace. If you decide to upgrade an existing project in order to switch to the updated scheduler control, see the Migration Guidelines document.

Use the SetSelection method to select time cells within the view. The Resource object defined via the resource parameter specifies the resource associated with the selected cells when the view is grouped with the SchedulerViewBase.GroupType set to SchedulerGroupType.Resource or SchedulerGroupType.Date values. For a scheduler without resources, specify the ResourceEmpty.Resource value as the resource parameter.

Note

Calling the SetSelection method raises the SchedulerControl.SelectionChanged event.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the SetSelection(TimeInterval, Resource) method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also