DxSchedulerDataStorage.AppointmentMappings Property

Specifies how the appointment properties are mapped to the data source fields.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v21.1.dll

Declaration

public DxSchedulerAppointmentMappings AppointmentMappings { get; set; }

Property Value

Type Description
DxSchedulerAppointmentMappings

A DxSchedulerAppointmentMappings object that provides information on the mapping of the appointment properties to the data fields.

Remarks

The appointment data source and mappings are mandatory for proper DxSchedulerDataStorage operation. You should specify the AppointmentMappings and the AppointmentsSource properties.

@code {
    DxSchedulerDataStorage DataStorage = new DxSchedulerDataStorage() {
        AppointmentsSource = new Lazy<List<Appointment>>(InitAppointments),
        AppointmentMappings = new DxSchedulerAppointmentMappings() {
            Id = "AppointmentId",
            Start = "StartDate",
            End = "EndDate",
            Subject = "Caption",
            AllDay = "AllDay",
            Location = "Location",
            Description = "Description",
            LabelId = "Label",
            StatusId = "Status"
        }
    };

    List<Appointment> InitAppointments() {
        DateTime date = DateTime.Today.Date;
        var dataSource = new List<Appointment>() {
                new Appointment {
                    AppointmentId = 1,
                    Caption = "Website Re-Design Plan",
                    StartDate = date + (new TimeSpan(1, 9, 30, 0)),
                    EndDate = date + (new TimeSpan(1, 11, 30, 0)),
                    Label = 4,
                    Status = 3
                },
                new Appointment {
                    AppointmentId = 2,
                    Caption = "Book Flights to San Fran for Sales Trip",
                    StartDate = date + (new TimeSpan(1, 12, 0, 0)),
                    EndDate = date + (new TimeSpan(1, 13, 0, 0)),
                    AllDay = true,
                    Label = 3,
                    Status = 3
                },
                new Appointment {
                    AppointmentId = 3,
                    Caption = "Install New Router in Dev Room",
                    StartDate = date + (new TimeSpan(1, 13, 30, 0)),
                    EndDate = date + (new TimeSpan(1, 15, 30, 0)),
                    Label = 5,
                    Status = 3
                },
        }
        return dataSource;
    }
}
See Also