Back to Devexpress

ResourceDataStorage.Filter Property

windowsforms-devexpress-dot-xtrascheduler-dot-resourcedatastorage-e5cf9bc6.md

latest3.8 KB
Original Source

ResourceDataStorage.Filter Property

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

Namespace : DevExpress.XtraScheduler

Assembly : DevExpress.XtraScheduler.v25.2.dll

NuGet Package : DevExpress.Win.Scheduler

Declaration

csharp
[DefaultValue("")]
[DXCategory("Data")]
public string Filter { get; set; }
vb
<DefaultValue("")>
<DXCategory("Data")>
Public Property Filter As String

Property Value

TypeDefaultDescription
StringString.Empty

A string containing a logical expression.

|

Remarks

Resources are filtered before they are visible in the Scheduler view. If you apply a filter, the storage still contains all resources, but only resources 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 AppointmentDataStorage.FilterCriteria property. When the Filter property is set, the AppointmentDataStorage.FilterCriteria obtains its value by using the CriteriaOperator.Parse method.

Tip

Use the SchedulerDataStorage.FilterAppointment and SchedulerDataStorage.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’.

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

See Also

Filter

FilterAppointment

FilterResource

Criteria Language Syntax

ResourceDataStorage Class

ResourceDataStorage Members

DevExpress.XtraScheduler Namespace