How to: Filter Resources (legacy)
Note
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.
This example demonstrates how to use the SchedulerStorage.FilterResource event to filter resources shown within a Scheduler Control according to some conditions. Specifically, the code below shows only the first three resources.
using DevExpress.XtraScheduler;
// ...
private void SchedulerStorage_FilterResource(object sender, PersistentObjectCancelEventArgs e) {
Resource res = (Resource)e.Object;
// Filter the first three resources in a collection.
e.Cancel = schedulerControl1.Storage.ResourceStorage.Items.IndexOf(res) > 2;
}