The requested page is not available for the requested platform. You are viewing the content for Default platform.

ASPxClientScheduler.AppointmentDeleting Event

Client-side event that fires before an appointment is deleted.

Declaration

AppointmentDeleting: ASPxClientEvent<ASPxClientAppointmentDeletingEventHandler<ASPxClientScheduler>>

Event Data

The AppointmentDeleting event handler receives an argument of the ASPxClientAppointmentDeletingEventArgs type. The following properties provide information specific to this event.

Property Description
appointmentIds Gets client IDs of the appointments to be removed.
cancel Gets or sets a value indicating whether the action which raised the event should be canceled.
(Inherited from ASPxClientCancelEventArgs)

Remarks

This client-side event enables you to decide whether a particular appointment should be deleted. You can analyze the ASPxClientAppointmentDeletingEventArgs.appointmentIds object, containing client appointment IDs. Use the ASPxClientScheduler.GetAppointmentById property to get more information on a certain appointment. If its deletion is not what you want, set the ASPxClientCancelEventArgs.cancel parameter to true.

Examples

The following example illustrates how to use the ASPxClientScheduler.AppointmentDeleting event.

protected void ASPxScheduler1_InitClientAppointment(object sender, InitClientAppointmentEventArgs args) {
// Custom Field values (additional information about appointments) are passed to the client appointments so that these fields values can be analyzed in JS
    args.Properties.Add("cpCompleted", args.Appointment.CustomFields["LessonCompleted"]);
    args.Properties.Add("cpCustomRecurringFlag", args.Appointment.CustomFields["CustomRecurringFlag"]);
    args.Properties.Add("cpCustomRecurringID", args.Appointment.CustomFields["CustomRecurringID"]);
}
See Also