Skip to main content

DxScheduler.GroupType Property

Specifies how Scheduler appointments are grouped.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

Declaration

[DefaultValue(SchedulerGroupType.None)]
[Parameter]
public SchedulerGroupType GroupType { get; set; }

Property Value

Type Default Description
SchedulerGroupType None

A SchedulerGroupType enumeration value.

Available values:

Name Description
None

Appointments are not grouped.

Resource

Appointments are grouped by resource.

Date

Appointments are grouped by date.

Remarks

If the Scheduler‘s appointments belong to more than one resource, use the GroupType property to group the appointments in the scheduling area. The SchedulerGroupType enumeration specifies the available group types and allow you to group appointments by date, resource, or no group.

The following code snippet display the Scheduler component grouped by resource:

<DxScheduler StartDate="DateTime.Today"
             DataStorage="DataStorage"
             GroupType="SchedulerGroupType.Resource">
    <DxSchedulerDayView DayCount="3" ShowWorkTimeOnly="true"></DxSchedulerDayView>
    <DxSchedulerWeekView />
    <DxSchedulerWorkWeekView />
    <DxSchedulerTimelineView />
</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

The following code snippet display the Scheduler component grouped by date:

<DxScheduler StartDate="@DateTime.Today"
             DataStorage="@DataStorage"
             GroupType="@SchedulerGroupType.Date" >
    <DxSchedulerDayView DayCount="3" ShowWorkTimeOnly="true"></DxSchedulerDayView>
    <DxSchedulerWeekView />
    <DxSchedulerWorkWeekView />
    <DxSchedulerTimelineView />
</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"
            Color = "Color",
            BackgroundCssClass = "BackgroundCss",
            TextCssClass = "TextCss"
        }
    };
}

Scheduler Resources

See Also