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: Handle Reminder Alerts in Code

  • 2 minutes to read

The following example demonstrates how to manually handle reminders and perform a custom action when the SchedulerStorageBase.ReminderAlert event is fired.

View Example

    // Handle this event to perform a custom action when a reminder alert is fired.
    schedulerStorage1.ReminderAlert += SchedulerStorage1_ReminderAlert;
    // Specify the interval at which the reminder is polled for alert.
    schedulerStorage1.RemindersCheckInterval = checkInterval * 1000;
    // Hide the reminder alert window.
    schedulerControl1.OptionsBehavior.ShowRemindersForm = false;
private void SchedulerStorage1_ReminderAlert(object sender, ReminderEventArgs e) {
    // Create a new appointment.
    Appointment app = schedulerStorage1.CreateAppointment(AppointmentType.Normal);
    app.Subject = "Created on alert from appointment w/Price = " + e.AlertNotifications[0].ActualAppointment.CustomFields["CustomPrice"];
    app.Start = e.AlertNotifications[0].ActualAppointment.Start.AddHours(2);
    app.Duration = TimeSpan.FromHours(4);
    schedulerStorage1.Appointments.Add(app);

    // Modify the appointment for which the alert is triggered.
    e.AlertNotifications[0].ActualAppointment.LabelKey = 3;

    // Prevent the event from being fired one more time.
    e.AlertNotifications[0].ActualAppointment.Reminder.Dismiss();
}