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

SchedulerTimelineHeaderCellInfo Class

Stores information about a header cell in the Scheduler.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
public class SchedulerTimelineHeaderCellInfo

#Remarks

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">
    <Views>
        <DxSchedulerTimelineView Duration="@(TimeSpan.FromHours(36))" CellMinWidth="100">
            <Scales>
                <DxSchedulerTimeScale Unit="@SchedulerTimeScaleUnit.Month" UnitCount="1" />
                <DxSchedulerTimeScale Unit="@SchedulerTimeScaleUnit.Day" UnitCount="1" />
            </Scales>
            <DateHeaderCellTemplate>
                <div style="width: 100%;">
                    <span>@(context.Scale.Unit == SchedulerTimeScaleUnit.Month ? context.Interval.Start.ToString("MMMM") : context.Interval.Start.Day)</span>
                </div>
            </DateHeaderCellTemplate>
        </DxSchedulerTimelineView>
    </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 - Timeline Date Header Template

#Inheritance

Object
SchedulerTimelineHeaderCellInfo
See Also