This example demonstrates how to use the SchedulerStorage.FilterAppointment event to filter appointments shown within a Scheduler Control according to specific conditions. Specifically, the code below hides all tentative appointments (those whose status is set to AppointmentStatusType.Tentative).
using DevExpress.XtraScheduler;
private void SchedulerStorage_FilterAppointment(object sender, PersistentObjectCancelEventArgs e) {
e.Cancel = ((Appointment)e.Object).StatusId == 1;
}
Imports Microsoft.VisualBasic
Imports DevExpress.XtraScheduler
Private Sub SchedulerStorage_FilterAppointment(sender As System.Object, _
e As PersistentObjectCancelEventArgs)
e.Cancel = CType(e.Object, Appointment).StatusId = 1
End Sub
<dxsch:SchedulerControl.Storage>
<dxsch:SchedulerStorage FilterAppointment="SchedulerStorage_FilterAppointment"/>
</dxsch:SchedulerControl.Storage>