corelibraries-devexpress-dot-xtrascheduler-dot-appointment-07430ca7.md
Gets or sets the identifier of the label object associated with the appointment.
Namespace : DevExpress.XtraScheduler
Assembly : DevExpress.XtraScheduler.v25.2.Core.dll
NuGet Package : DevExpress.Scheduler.Core
object LabelKey { get; set; }
Property LabelKey As Object
| Type | Description |
|---|---|
| Object |
An object that specifies the unique identifier of the AppointmentLabel.
|
If a SchedulerControl is used in bound mode (that is its data is stored in a database) the LabelKey property’s value is obtained from the data field specified by the AppointmentMappingInfo.Label property.
The following code snippets (auto-collected from DevExpress Examples) contain references to the LabelKey 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.
winforms-scheduler-formatting-services/CS/FormattingServicesExample/Data/Data.cs#L35
apt.StatusKey = 2;
apt.LabelKey = 2;
schedulerStorage1.Appointments.Add(apt);
var eventColorId = e.Event.ColorId ?? this.defaultLabelKey;
e.IsEqual = eventColorId == (string)e.Appointment.LabelKey;
}
winforms-scheduler-create-appointments-on-reminder-alert/CS/ReminderCustomActions/Form1.cs#L56
// Modify the appointment for which the alert is triggered.
e.AlertNotifications[0].ActualAppointment.LabelKey = 3;
this.appointmentLabelEdit1.Storage = storage;
this.appointmentLabelEdit1.AppointmentLabel = storage.Appointments.Labels.GetById(appointment.LabelKey);
this.edtSubject.Text = appointment.Subject;
winforms-scheduler-drag-drop-appointments-from-grid/CS/T179722/Form1.cs#L91
Duration = apt.Duration,
LabelKey = (int)apt.LabelKey,
StatusKey = (int)apt.StatusKey
winforms-scheduler-formatting-services/VB/FormattingServicesExample/Data/Data.vb#L30
apt.StatusKey = 2
apt.LabelKey = 2
schedulerStorage1.Appointments.Add(apt)
Dim eventColorId = If(e.Event.ColorId, Me.defaultLabelKey)
e.IsEqual = eventColorId = DirectCast(e.Appointment.LabelKey, String)
End Sub
winforms-scheduler-create-appointments-on-reminder-alert/VB/ReminderCustomActions/Form1.vb#L58
' Modify the appointment for which the alert is triggered.
e.AlertNotifications(0).ActualAppointment.LabelKey = 3
Me.appointmentLabelEdit1.Storage = control.Storage
Me.appointmentLabelEdit1.AppointmentLabel = storage.Appointments.Labels.GetById(appointment.LabelKey)
Me.edtSubject.Text = appointment.Subject
winforms-scheduler-drag-drop-appointments-from-grid/VB/T179722/Form1.vb#L77
Dim apt = aptInfo.EditedAppointment
exchangeList.Add(New T179722.AppointmentExchangeData() With {.Subject = apt.Subject, .Description = apt.Description, .Start = System.DateTime.MinValue, .Duration = apt.Duration, .LabelKey = CInt(apt.LabelKey), .StatusKey = CInt(apt.StatusKey)})
Next
See Also