Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

How to: Hide the Reminder (Bell) Icon for Outdated Appointments in a Series

  • 2 minutes to read

The following example demonstrates how to hide the reminder icon for past appointments in a series. Since they are outdated, the user should not be reminded of them, and displaying the bell icon has no sense.

To achieve this, the SchedulerControl.AppointmentViewInfoCustomizing event is handled. The RecurringReminder.AlertOccurrenceIndex property is used to indicate the first appointment in a chain for which an alert will be invoked. All occurrences with Appointment.RecurrenceIndex less than the AlertOccurrenceIndex are outdated.

void scheduler_AppointmentViewInfoCustomizing(object sender, 
    AppointmentViewInfoCustomizingEventArgs e)
{
    Appointment apt = e.ViewInfo.Appointment;
    if (apt.HasReminder && apt.Type == AppointmentType.Occurrence && 
        apt.RecurrencePattern != null)
    {
        Appointment pattern = apt.RecurrencePattern;
        RecurringReminder reminder = (RecurringReminder)pattern.Reminder;
        e.ViewInfo.ShowBell = reminder.AlertOccurrenceIndex < = apt.RecurrenceIndex;
    }
}
See Also