Back to Devexpress

SchedulerViewBase.GetAppointments() Method

windowsforms-devexpress-dot-xtrascheduler-dot-schedulerviewbase-a03af16e.md

latest3.9 KB
Original Source

SchedulerViewBase.GetAppointments() Method

Gets the collection of appointments displayed in the current Scheduler view.

Namespace : DevExpress.XtraScheduler

Assembly : DevExpress.XtraScheduler.v25.2.dll

NuGet Package : DevExpress.Win.Scheduler

Declaration

csharp
public virtual AppointmentBaseCollection GetAppointments()
vb
Public Overridable Function GetAppointments As AppointmentBaseCollection

Returns

TypeDescription
AppointmentBaseCollection

An AppointmentBaseCollection object, representing an appointments’ collection.

|

Remarks

If the current view does not contain appointments, this method returns a new collection which does not contain elements.

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

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-resolve-appointment-conflicts/CS/DXApplication1/Form1.cs#L68

csharp
Appointment apt = viewInfo.Appointment;
AppointmentBaseCollection allAppointments = scheduler.ActiveView.GetAppointments();
AppointmentConflictsCalculator aCalculator = new AppointmentConflictsCalculator(allAppointments);

winforms-scheduler-serialize-deserialize-appointments/CS/DXApplication1/SerializationHelper.cs#L18

csharp
SchedulerCompatibility.Base64XmlObjectSerialization = true;
foreach (Appointment apt in scheduler.ActiveView.GetAppointments())
{

winforms-scheduler-resolve-appointment-conflicts/VB/DXApplication1/Form1.vb#L57

vb
Dim apt As Appointment = viewInfo.Appointment
Dim allAppointments As AppointmentBaseCollection = scheduler.ActiveView.GetAppointments()
Dim aCalculator As AppointmentConflictsCalculator = New AppointmentConflictsCalculator(allAppointments)

winforms-scheduler-serialize-deserialize-appointments/VB/DXApplication1/SerializationHelper.vb#L14

vb
SchedulerCompatibility.Base64XmlObjectSerialization = True
For Each apt As Appointment In scheduler.ActiveView.GetAppointments()
    Dim helper As AppointmentXmlPersistenceHelper = New AppointmentXmlPersistenceHelper(apt, Nothing)

See Also

SchedulerViewBase Class

SchedulerViewBase Members

DevExpress.XtraScheduler Namespace