DXGoogleCalendarSync.FilterAppointments Event

Allows you to skip certain Scheduler Appointments and\or Google Calendar Events during synchronization.

Namespace: DevExpress.XtraScheduler.GoogleCalendar

Assembly: DevExpress.XtraScheduler.v20.2.GoogleCalendar.dll


public event EventHandler<FilterAppointmentsEventArgs> FilterAppointments
Public Event FilterAppointments As EventHandler(Of FilterAppointmentsEventArgs)

Event Data

The FilterAppointments event's data class is DevExpress.XtraScheduler.GoogleCalendar.FilterAppointmentsEventArgs.


When the DXGoogleCalendarSync component finds a new appointment/event, it fires the FilterAppointments event with this new object stored in either e.Appointment or e.Event parameter. You can read these parameters and check appointment/event settings. If this object should not be synchronized (a Google Calendar or Scheduler Control should not create a matching event/appointment), set the e.Cancel parameter to true.

The sample below illustrates how to skip all appointments that have "test" in their descriptions, and all Google Events with the "tentative" status.

private void GcSyncComponent_FilterAppointments(object sender, FilterAppointmentsEventArgs e) {
    if (e.Appointment!=null && e.Appointment.Description.Contains("test"))
        e.Cancel = true;
    if (e.Event!=null && e.Event.Status == "tentative")
        e.Cancel = true;
See Also