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

DxScheduler.GroupType Property

Specifies how Scheduler appointments are grouped.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
[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:

Razor
<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:

Razor
<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