Skip to main content

AppointmentLabel.CustomFields Property

Gets the collection of custom fields bound to the appointment label.

Namespace: DevExpress.XtraScheduler

Assembly: DevExpress.XtraScheduler.v25.2.dll

NuGet Package: DevExpress.Win.Scheduler

Declaration

[Browsable(false)]
public CustomFieldCollection CustomFields { get; }

Property Value

Type Description
CustomFieldCollection

The collection of custom fields bound to the appointment label.

Remarks

Use the SchedulerDataStorage.Labels.CustomFieldMappings property to map custom fields to appointment properties and populate the CustomFields collection.

The following code snippet maps a custom field and filters appointments based on the custom field value:

using DevExpress.XtraScheduler;

schedulerDataStorage1.Labels.CustomFieldMappings.Add(new AppointmentLabelCustomFieldMapping("PropertyOne", "DataFieldOne"));
// ...
private void SchedulerDataStorage1_FilterAppointment(object sender, PersistentObjectCancelEventArgs e) {
    SchedulerDataStorage storage = sender as SchedulerDataStorage;
    if (e.Object is Appointment a) {
        e.Cancel = storage.Labels.Items.GetById(a.LabelKey).CustomFields["PropertyOne"].ToString() == "Hidden";
    }
}

Refer to the following help topic for more information: Custom Fields.

See Also