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

SchedulerTimeCellInfo Class

Stores information about a time cell in the Scheduler.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
public class SchedulerTimeCellInfo

#Remarks

A SchedulerTimeCellInfo object is passed as the context parameter to time cell templates. Use the Interval property to get the interval to which a time cell belongs. The Resource property specifies the resource associated with the time cell or contains an empty resource item if no resource is assigned.

The following example displays placeholder text for time cells that do not contain appointments:

@using Data

<DxScheduler StartDate="@DateTime.Today"
             DataStorage="@DataStorage">
    <DxSchedulerMonthView>
        <TimeCellTemplate>
            @{
                var appointments = DataStorage.GetAppointments(context.Interval).ToList();
                if (appointments.Count == 0) {
                    <div style="height: 100%; display: flex; justify-content:center">
                        Nothing planned</div>
                }
             }
        </TimeCellTemplate>
    </DxSchedulerMonthView>
</DxScheduler>

@code {
    DxSchedulerDataStorage DataStorage = new DxSchedulerDataStorage() {
        AppointmentsSource = RecurringAppointmentCollection.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 Time Cell Template in Month View

#Inheritance

Object
SchedulerTimeCellInfo
See Also