ReminderEventArgs.AlertNotifications Property
Gets any reminders currently triggered.
Namespace: DevExpress.XtraScheduler
Assembly: DevExpress.XtraScheduler.v18.1.Core.dll
Declaration
Property Value
Type | Description |
---|---|
ReminderAlertNotificationCollection | A ReminderAlertNotificationCollection object which holds a collection of notifications. |
Remarks
The SchedulerStorageBase.ReminderAlert event is raised when a reminder alert is invoked. Note that multiple reminders can trigger at the same time. Use the AlertNotifications property to access these reminders. Each notification is represented by a ReminderAlertNotification object.
Example
The following example demonstrates how to manually handle reminders and perform a custom action when the SchedulerStorageBase.ReminderAlert event is fired.
Note
A complete sample project is available at https://github.com/DevExpress-Examples/custom-form-custom-fields-and-custom-actions-on-reminder-alert-e382
// 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();
}
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the AlertNotifications property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.