DxSchedulerDataStorage.ResourceMappings Property

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

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v20.2.dll

Declaration

public DxSchedulerResourceMappings ResourceMappings { get; set; }

Property Value

Type Description
DxSchedulerResourceMappings

A DxSchedulerResourceMappings object that stores information about how the resource properties are mapped to the data fields.

Remarks

You should always specify the ResourceMappings and the ResourcesSource properties when you create a Scheduler component with appointment resources.

<DxScheduler StartDate="@DateTime.Today"
             DataStorage="@DataStorage"
             GroupType="@SchedulerGroupType.Resource" >
    <DxSchedulerDayView DayCount="2" ShowWorkTimeOnly="true"></DxSchedulerDayView>
</DxScheduler>

@code {
    DxSchedulerDataStorage DataStorage = new DxSchedulerDataStorage() {
        AppointmentsSource = ResourceAppointmentCollection.GetAppointmentsForGrouping(),
        AppointmentMappings = new DxSchedulerAppointmentMappings() {
            Type = "AppointmentType",
            Start = "StartDate",
            End = "EndDate",
            Subject = "Caption",
            AllDay = "AllDay",
            Location = "Location",
            Description = "Description",
            LabelId = "Label",
            StatusId = "Status",
            RecurrenceInfo = "Recurrence",
            ResourceId = "ResourceId"
        },
        ResourcesSource = ResourceAppointmentCollection.GetResourcesForGrouping(),
        ResourceMappings = new DxSchedulerResourceMappings() {
            Id = "Id",
            Caption = "Text",
            BackgroundCssClass = "BackgroundCss",
            TextCssClass = "TextCss"
        }
    };
}

Scheduler Resources

Run Demo: Scheduler - Resources

See Also