DxSchedulerDataStorage.ResourcesSource Property

Specifies a data source for the appointment's resources.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v20.2.dll


public IEnumerable ResourcesSource { get; set; }

Property Value

Type Description

A collection of objects with resource data.


Do the following to bind the Scheduler's resource collection to data:

  1. Create a DxSchedulerDataStorage object. Use the constructor without parameters.
  2. Use the ResourcesSource property to fill the storage with a collection of data objects.
  3. Create a DxSchedulerResourceMappings object and map data source fields to resource properties.
  4. Assign the created object to the DxSchedulerDataStorage.ResourceMappings property.
  5. Assign the data source to the Scheduler's DataStorage property.
<DxScheduler StartDate="@DateTime.Today"
             GroupType="@SchedulerGroupType.Resource" >
    <DxSchedulerDayView DayCount="2" ShowWorkTimeOnly="true"></DxSchedulerDayView>

@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

If you do not need to display all of the resources from the data source, use the VisibleResourcesDataSource property to specify visible resources.

See Also