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

DxSchedulerDayViewBase.AllDayTimeCellTemplate Property

Specifies the template for Scheduler all-day time cells.

Namespace: DevExpress.Blazor.Base

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
[Parameter]
public RenderFragment<SchedulerTimeCellInfo> AllDayTimeCellTemplate { get; set; }

#Property Value

Type Description
RenderFragment<SchedulerTimeCellInfo>

The cell template.

#Remarks

This template accepts a SchedulerTimeCellInfo object as the context parameter. You can use the parameter’s Interval property to get the interval to which the time cell belongs. The parameter’s Resource property specifies the resource associated with the cell or contains an empty resource item if no resource is assigned.

The following example adds the “No events“ text to all-day cells that correspond to dates without appointments:

<DxScheduler StartDate="@DateTime.Today" DataStorage="@DataStorage">
    <Views>
        <DxSchedulerDayView DayCount="5" ShowWorkTimeOnly="true">
            <AllDayTimeCellTemplate>
                @{
                    var appointments = DataStorage.GetAppointments(context.Interval).ToList();
                    if (appointments.Count == 0) {
                        <span>No events</span>
                    }
                }
            </AllDayTimeCellTemplate>
        </DxSchedulerDayView>
    </Views>
</DxScheduler>

@code {
    DxSchedulerDataStorage DataStorage = new DxSchedulerDataStorage() {
        AppointmentsSource = AppointmentCollection.GetAppointments(),
        AppointmentMappings = new DxSchedulerAppointmentMappings() {
            Type = "AppointmentType",
            Start = "StartDate",
            End = "EndDate",
            Subject = "Caption",
            AllDay = "AllDay",
            Location = "Location",
            Description = "Description",
            LabelId = "Label",
            StatusId = "Status",
            RecurrenceInfo = "Recurrence"
        }
    };
}

Scheduler - All-Day Template

See Also