Back to Devexpress

DxScheduler.AppointmentFormLayout Property

blazor-devexpress-dot-blazor-dot-dxscheduler-abcefbfa.md

latest4.8 KB
Original Source

DxScheduler.AppointmentFormLayout Property

Specifies the layout of the extended form that appears when you create an appointment and click the expand button, or when you edit an appointment.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
[Parameter]
public RenderFragment<SchedulerAppointmentFormInfo> AppointmentFormLayout { get; set; }

Property Value

TypeDescription
RenderFragment<SchedulerAppointmentFormInfo>

The form content.

|

Remarks

Use the following properties to create a custom appointment edit form:

  • AppointmentCompactFormLayout - the layout of the compact form that appears when a user creates or edits an appointment.
  • AppointmentFormLayout - the layout of the pop-up (detailed) form that opens when a user clicks the expand button in the compact form.

The edit forms are implemented internally as the DxFormLayout component. You can create the form based on layout items in the same way as in the form layout. The Scheduler ships with a set of predefined layout items that correspond to items of the default edit form (DxSchedulerSubjectFormLayoutItem, DxSchedulerStartDateFormLayoutItem, etc.). You can also add a custom item (DxSchedulerCustomFormLayoutItem) and use the Template property to define item content.

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

razor
<DxScheduler StartDate="@DateTime.Today"
             DataStorage="@DataStorage"
             ActiveViewType="SchedulerViewType.WorkWeek">
    <Views>
        <DxSchedulerWorkWeekView VisibleTime="@(new DxSchedulerTimeSpanRange(TimeSpan.FromHours(8), 
                                 TimeSpan.FromHours(19)))">
            @*...*@
        </DxSchedulerWorkWeekView>
    </Views>
    <AppointmentFormLayout Context="formInfo">
        <DxFormLayoutTabPages>
            <DxFormLayoutTabPage Caption="General Information">
                <DxSchedulerSubjectFormLayoutItem></DxSchedulerSubjectFormLayoutItem>
                <DxSchedulerStartDateFormLayoutItem></DxSchedulerStartDateFormLayoutItem>
                <DxSchedulerStartTimeFormLayoutItem></DxSchedulerStartTimeFormLayoutItem>
                <DxSchedulerEndDateFormLayoutItem></DxSchedulerEndDateFormLayoutItem>
                <DxSchedulerEndTimeFormLayoutItem></DxSchedulerEndTimeFormLayoutItem>
                <DxSchedulerAllDayFormLayoutItem ColSpanMd="6"></DxSchedulerAllDayFormLayoutItem>
                <DxSchedulerCustomFormLayoutItem ColSpanMd="6">
                    <Template>
                        <div class="my-margin">
                            <DxCheckBox @bind-Checked="@(((CustomAppointmentFormInfo)formInfo).IsAccepted)" 
                                        Alignment="CheckBoxContentAlignment.Right">Accept</DxCheckBox>
                        </div>
                    </Template>
                </DxSchedulerCustomFormLayoutItem>
            </DxFormLayoutTabPage>
            <DxFormLayoutTabPage Caption="Additional Information">
                <DxSchedulerLocationFormLayoutItem></DxSchedulerLocationFormLayoutItem>
                <DxSchedulerDescriptionFormLayoutItem></DxSchedulerDescriptionFormLayoutItem>
            </DxFormLayoutTabPage>
        </DxFormLayoutTabPages>
    </AppointmentFormLayout>
</DxScheduler>
css
.my-margin {
    margin-left: auto; 
    margin-top: 14px;
}

Run Demo: Scheduler - Custom Fields and Appointment Form

YouTube video

See Also

DxScheduler Class

DxScheduler Members

DevExpress.Blazor Namespace