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

DxSchedulerDiscardAppointmentChangesButton Class

A button that discards changes in an appointment.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
public class DxSchedulerDiscardAppointmentChangesButton :
    SchedulerPopupButtonBase

#Remarks

Use the DxSchedulerDiscardAppointmentChangesButton object to add the Discard Changes button to an appointment’s tooltip, an edit form (compact or detailed), or recurrence settings form. Declare this object in the following properties:

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>

Scheduler - Compact Form Header

Run Demo: Scheduler - Custom Fields and Appointment Form

#Inheritance

Object
ComponentBase
SchedulerPopupButtonBase
DxSchedulerDiscardAppointmentChangesButton
See Also