Skip to main content
All docs
V25.2
  • AppointmentStatus.CustomFields Property

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

    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 status.

    Remarks

    Use the SchedulerDataStorage.Statuses.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.Statuses.CustomFieldMappings.Add(new AppointmentStatusCustomFieldMapping("PropertyOne", "DataFieldOne"));
    // ...
    private void SchedulerDataStorage1_FilterAppointment(object sender, PersistentObjectCancelEventArgs e) {
        SchedulerDataStorage storage = sender as SchedulerDataStorage;
        if (e.Object is Appointment a) {
            e.Cancel = storage.Statuses.Items.GetById(a.StatusKey).CustomFields["PropertyOne"].ToString() == "Hidden";
        }
    }
    

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

    See Also