Skip to main content

SchedulerTimeCellInfo Class

Stores information about a time cell in the Scheduler.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v23.2.dll

NuGet Package: DevExpress.Blazor

Declaration

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