Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

SchedulerAppointmentFormInfo Class

Stores information about the appointment edit form.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
public class SchedulerAppointmentFormInfo :
    INotifyPropertyChanged

The following members return SchedulerAppointmentFormInfo objects:

#Remarks

The appointment edit form appears when you create or edit an appointment.

You can use the AppointmentFormLayout and AppointmentCompactFormLayout properties to create a custom appointment form. These properties accept a SchedulerAppointmentFormInfo class object as the Context parameter. You can use this parameter in the template of a custom layout item (DxSchedulerCustomFormLayoutItem) to get an appointment’s settings.

A SchedulerAppointmentFormInfo class object is also passed as the FormInfo argument to the AppointmentFormShowing event. If an appointment contains custom properties, you should implement a SchedulerAppointmentFormInfo descendant, declare the corresponding properties in the class, and then assign a custom descendant instance to the FormInfo argument.

For more information, refer to the following help topic: Custom Appointment Form.

<DxScheduler StartDate="@DateTime.Today"
             DataStorage="@DataStorage"
             ActiveViewType="SchedulerViewType.WorkWeek"
             AppointmentFormShowing="OnAppointmentFormShowing">
    @*...*@
    <AppointmentFormLayout Context="formInfo">
        @*...*@
        <DxSchedulerCustomFormLayoutItem ColSpanMd="12">
            <Template>
                <div style="margin-left: auto; margin-top: 14px;">
                    <DxCheckBox @bind-Checked="@(((CustomAppointmentFormInfo)formInfo).IsAccepted)" 
                                Alignment="CheckBoxContentAlignment.Right">Accept</DxCheckBox>
                </div>
            </Template>
        </DxSchedulerCustomFormLayoutItem>
    </AppointmentFormLayout>

</DxScheduler>

@code {
    DxScheduler scheduler { get; set; }

    public class CustomAppointmentFormInfo : SchedulerAppointmentFormInfo {
        public CustomAppointmentFormInfo(DxSchedulerAppointmentItem AppointmentItem, 
                DxSchedulerDataStorage DataStorage, DxScheduler scheduler) : base(AppointmentItem, DataStorage, scheduler) { }

        public bool IsAccepted {
            get { return (bool)CustomFields["IsAccepted"]; }
            set { CustomFields["IsAccepted"] = value; }
        }
    }

    void OnAppointmentFormShowing(SchedulerAppointmentFormEventArgs args) {
        args.FormInfo = new CustomAppointmentFormInfo(args.Appointment, DataStorage, scheduler);
    }
    // ...
}

#Inheritance

Object
SchedulerAppointmentFormInfo
See Also