DxScheduler.AppointmentCompactFormHeaderTemplate Property
Specifies the template for the compact edit form‘s header.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v24.1.dll
NuGet Package: DevExpress.Blazor
Declaration
[Parameter]
public RenderFragment<SchedulerAppointmentFormInfo> AppointmentCompactFormHeaderTemplate { get; set; }
Property Value
Type | Description |
---|---|
RenderFragment<SchedulerAppointmentFormInfo> | The template content. |
Remarks
The compact form header displays the Appointment text and buttons (Save Changes, Discard Changes, and Show Appointment Form).
You can use the AppointmentCompactFormHeaderTemplate
property to customize the header’s layout and appearance. This property accepts a SchedulerAppointmentFormInfo object as the context
parameter. Use the context
parameter to access appointment data.
The following code snippet customizes the header of the compact edit form. The header displays the appointment’s subject and buttons (Save Changes, Delete Appointment, Discard Changes, and Show Appointment Form).
<DxScheduler StartDate="@DateTime.Today"
DataStorage="@DataStorage">
<Views>
<DxSchedulerWeekView ShowWorkTimeOnly="false"
TimeIndicatorVisibility="SchedulerTimeIndicatorVisibility.Never"
TimeScale="@(new TimeSpan(0,15,0))"
WorkTime="@(new DxSchedulerTimeSpanRange(TimeSpan.FromHours(9), TimeSpan.FromHours(18)))"
VisibleTime="@(new DxSchedulerTimeSpanRange(TimeSpan.FromHours(8), TimeSpan.FromHours(19)))">
</DxSchedulerWeekView>
</Views>
<AppointmentCompactFormHeaderTemplate>
<div class="popup-text-header">@context.Subject</div>
<DxSchedulerSaveAppointmentChangesButton></DxSchedulerSaveAppointmentChangesButton>
<DxSchedulerDeleteAppointmentButton Text="@null"></DxSchedulerDeleteAppointmentButton>
<DxSchedulerDiscardAppointmentChangesButton></DxSchedulerDiscardAppointmentChangesButton>
<DxSchedulerShowAppointmentFormButton></DxSchedulerShowAppointmentFormButton>
</AppointmentCompactFormHeaderTemplate>
</DxScheduler>
@code {
DxSchedulerDataStorage DataStorage = new DxSchedulerDataStorage() {
AppointmentsSource = AppointmentCollection.GetAppointments(),
AppointmentMappings = new DxSchedulerAppointmentMappings() {
Type = "AppointmentType",
Start = "StartDate",
End = "EndDate",
Subject = "Caption",
AllDay = "AllDay",
Location = "Location",
Description = "Description",
LabelId = "Label",
StatusId = "Status",
RecurrenceInfo = "Recurrence"
}
};
}
<style>
.popup-text-header {
margin-right: auto;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
</style>