Skip to main content

SchedulerDateHeaderCellInfo Class

Stores information about a Scheduler’s header cell that displays a date.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v23.2.dll

NuGet Package: DevExpress.Blazor


public class SchedulerDateHeaderCellInfo


A SchedulerDateHeaderCellInfo object is passed as the context parameter to the following templates:

The parameter’s properties allow you to specify the following:

  • The interval to which the cell belongs (Interval).
  • Resources associated with the cell (Resources).

The following example adds weather indicator images to date header cells:

    @inject WeatherForecastService ForecastService

    <DxScheduler @bind-StartDate="@StartDate" DataStorage="@DataStorage" CssClass="w-100">
            <DxSchedulerDayView DayCount="5" ShowWorkTimeOnly="true">
                    <div style="display: flex;">
                        <div class="dxbs-sc-date-hr-wrapper" style="width: 100%;">
                            <span class="dxbs-sc-date-hr-day">@context.Interval.Start.Day</span>
                            <span class="dxbs-sc-date-hr-week">@context.Interval.Start.ToString("ddd")</span>
                            string cloudCover = GetCloudCoverByDate(context.Interval.Start);
                            if(!string.IsNullOrEmpty(cloudCover)) {
                                <span class="@string.Format("scheduler-cloud-cover-icon {0}", cloudCover)"></span>

@code {
    DateTime StartDate { get; set; } = DateTime.Today;

    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"

    string GetCloudCoverByDate(DateTime date) {
        foreach(WeatherForecast item in ForecastService.GetForecast())
            if(date.Day == item.Date.Day)
                return GetCloudCoverCssClass(item.CloudCover);
        return string.Empty;
    string GetCloudCoverCssClass(string cloudCover) {
        switch(cloudCover) {
            case "Storm":
                return "scheduler-icon-storm";
            case "Cloudy":
                return "scheduler-icon-cloudy";
            case "Partly cloudy":
                return "scheduler-icon-partly-cloudy";
            case "Sunny":
                return "scheduler-icon-sunny";
                return string.Empty;

Scheduler - Date Header Template

Run Demo: Scheduler - Date Header Template


See Also