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

AppointmentStorage.Filter Property

Gets or set an expression used as a criteria to filter appointments in the storage.

Namespace: DevExpress.XtraScheduler

Assembly: DevExpress.XtraScheduler.v19.2.dll

Declaration

[XtraSerializableProperty]
[DefaultValue("")]
public override string Filter { get; set; }

Property Value

Type Default Description
String String.Empty

A string containing a logical expression.

Remarks

Important

This API is intended to be used with the legacy SchedulerStorage only. Starting with version 18.1, SchedulerStorage and all of its satellite storages are replaced with their updated versions.

Appointments are filtered before they are visible in the Scheduler view. If you apply a filter, the storage still contains all appointments, but only appointments satisfying the filter criteria are displayed in the View.

The expression syntax is described in the Criteria Language Syntax topic.

The Filter property returns the string equivalent of the CriteriaOperator specified by the AppointmentStorage.FilterCriteria property. When the Filter property is set, the AppointmentStorage.FilterCriteria obtains its value by using the CriteriaOperator.Parse method.

Tip

Use the SchedulerStorageBase.FilterAppointment and SchedulerStorageBase.FilterResource events to hide specific objects.

Example

The following code instructs the Scheduler to display appointments with the Appointment.Subject containing the word “travel” whose Appointment.Start is August, 24 2017 or later, and resources whose caption (the Resource.Caption property value) begins with the letter ‘N’.

schedulerStorage1.Appointments.Filter = "Contains([Subject], 'travel') And [Start] >= #2017-08-24#";
schedulerStorage1.Resources.Filter = "StartsWith([Caption], 'N')";

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Filter property.

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