Back to Devexpress

SchedulerDataStorage.AppointmentsChanged Event

windowsforms-devexpress-dot-xtrascheduler-dot-schedulerdatastorage-9443dc9b.md

latest8.0 KB
Original Source

SchedulerDataStorage.AppointmentsChanged Event

Fires when the appointments’ properties have been changed.

Namespace : DevExpress.XtraScheduler

Assembly : DevExpress.XtraScheduler.v25.2.dll

NuGet Package : DevExpress.Win.Scheduler

Declaration

csharp
public event PersistentObjectsEventHandler AppointmentsChanged
vb
Public Event AppointmentsChanged As PersistentObjectsEventHandler

Event Data

The AppointmentsChanged event's data class is PersistentObjectsEventArgs. The following properties provide information specific to this event:

PropertyDescription
ObjectsGets the persistent objects for which the event occurs.

Remarks

The AppointmentsChanged event is raised after appointments’ properties have been changed. The appointments whose properties have been changed are identified by the event parameter’s PersistentObjectsEventArgs.Objects property.

Note that when an appointment is resized, its start/end times are changed, so the AppointmentsChanged event fires. You can use this event to be notified of any user operations which affect appointments - resizing, moving, dragging.

If you modify multiple appointments in code, and wrap this code in BeginUpdate \ EndUpdate method calls, the event fires only once.

Important

Do not modify the SchedulerDataStorage data (i.e., change the AppointmentCollection collection, the Appointment items, etc.) within this event handler. Otherwise, the declared changes might be lost and won’t take effect at runtime.

The following code snippets (auto-collected from DevExpress Examples) contain references to the AppointmentsChanged event.

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.

winforms-scheduler-create-appointment-edit-form-with-custom-fields/CS/SimpleCustomFields/Form1.cs#L21

csharp
schedulerDataStorage1.AppointmentChanging += SchedulerStorage1_AppointmentChanging;
schedulerDataStorage1.AppointmentsChanged += new PersistentObjectsEventHandler(this.OnApptChangedInsertedDeleted);
schedulerDataStorage1.AppointmentsDeleted += new PersistentObjectsEventHandler(this.OnApptChangedInsertedDeleted);

winforms-scheduler-optimize-performance-large-dataset/CS/FetchAppointmentExample/Form1.cs#L26

csharp
schedulerDataStorage1.AppointmentsChanged += OnApptChangedInsertedDeleted;
schedulerDataStorage1.AppointmentsInserted += OnApptChangedInsertedDeleted;

winforms-scheduler-custom-appointment-edit-form/CS/SchedulerDbExample/Form1.cs#L25

csharp
this.schedulerDataStorage1.AppointmentsChanged += OnAppointmentChangedInsertedDeleted;
this.schedulerDataStorage1.AppointmentsInserted += OnAppointmentChangedInsertedDeleted;

winforms-scheduler-linq-to-sql/CS/XtraScheduler_LINQ/Form1.cs#L44

csharp
void SuscribeSchedulerEvents() {
    this.schedulerStorage1.AppointmentsChanged += OnSchedulerStorage1AppointmentsChanged;
    this.schedulerStorage1.AppointmentsInserted += OnSchedulerStorage1AppointmentsInserted;

winforms-scheduler-bind-to-ms-sql-server/CS/SchedulerSQLRuntime/Form1.cs#L14

csharp
this.schedulerDataStorage1.AppointmentsInserted += OnApptChangedInsertedDeleted;
this.schedulerDataStorage1.AppointmentsChanged += OnApptChangedInsertedDeleted;
this.schedulerDataStorage1.AppointmentsDeleted += OnApptChangedInsertedDeleted;

winforms-scheduler-create-appointment-edit-form-with-custom-fields/VB/SimpleCustomFields/Form1.vb#L23

vb
AddHandler schedulerDataStorage1.AppointmentChanging, AddressOf SchedulerStorage1_AppointmentChanging
AddHandler schedulerDataStorage1.AppointmentsChanged, AddressOf OnApptChangedInsertedDeleted
AddHandler schedulerDataStorage1.AppointmentsDeleted, AddressOf OnApptChangedInsertedDeleted

winforms-scheduler-optimize-performance-large-dataset/VB/FetchAppointmentExample/Form1.vb#L27

vb
If scheduleTestDataSet.Resources.Rows.Count = 0 OrElse scheduleTestDataSet.Appointments.Rows.Count = 0 Then CreateSampleData()
AddHandler schedulerDataStorage1.AppointmentsChanged, AddressOf OnApptChangedInsertedDeleted
AddHandler schedulerDataStorage1.AppointmentsInserted, AddressOf OnApptChangedInsertedDeleted

winforms-scheduler-custom-appointment-edit-form/VB/SchedulerDbExample/Form1.vb#L27

vb
AddHandler Me.schedulerDataStorage1.AppointmentsChanged, AddressOf OnAppointmentChangedInsertedDeleted
AddHandler Me.schedulerDataStorage1.AppointmentsInserted, AddressOf OnAppointmentChangedInsertedDeleted

winforms-scheduler-linq-to-sql/VB/XtraScheduler_LINQ/Form1.vb#L46

vb
Private Sub SuscribeSchedulerEvents()
    AddHandler schedulerStorage1.AppointmentsChanged, AddressOf OnSchedulerStorage1AppointmentsChanged
    AddHandler schedulerStorage1.AppointmentsInserted, AddressOf OnSchedulerStorage1AppointmentsInserted

winforms-scheduler-bind-to-ms-sql-server/VB/SchedulerSQLRuntime/Form1.vb#L16

vb
AddHandler Me.schedulerDataStorage1.AppointmentsInserted, AddressOf OnApptChangedInsertedDeleted
AddHandler Me.schedulerDataStorage1.AppointmentsChanged, AddressOf OnApptChangedInsertedDeleted
AddHandler Me.schedulerDataStorage1.AppointmentsDeleted, AddressOf OnApptChangedInsertedDeleted

See Also

SchedulerDataStorage Class

SchedulerDataStorage Members

DevExpress.XtraScheduler Namespace