Skip to main content

SchedulerTimelineHeaderCellInfo Class

Stores information about a header cell in the Scheduler.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v22.2.dll

NuGet Package: DevExpress.Blazor


public class SchedulerTimelineHeaderCellInfo


A SchedulerTimelineHeaderCellInfo object is passed as the context parameter to header templates. Use the Interval property to get the interval the header cell belongs to. The Scale property returns the timescale that includes the header cell.

The following example adds two timescales to the Scheduler. The scales are measured in months and days, respectively. The DateHeaderCellTemplate adds the month name and dates to the corresponding scale’s header cells.

@inject WeatherForecastService ForecastService

<DxScheduler StartDate="@DateTime.Today" DataStorage="@DataStorage">
        <DxSchedulerTimelineView Duration="@(TimeSpan.FromHours(36))" CellMinWidth="100">
                <DxSchedulerTimeScale Unit="@SchedulerTimeScaleUnit.Month" UnitCount="1" />
                <DxSchedulerTimeScale Unit="@SchedulerTimeScaleUnit.Day" UnitCount="1" />
                <div style="width: 100%;">
                    <span>@(context.Scale.Unit == SchedulerTimeScaleUnit.Month ? context.Interval.Start.ToString("MMMM") : context.Interval.Start.Day)</span>

@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 - Timeline Date Header Template


See Also