menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class ScheduleHeaderRow - Blazor API Reference | Syncfusion

    Show / Hide Table of Contents

    Class ScheduleHeaderRow

    A class that represents the timeline view headers on the SfSchedule<TValue> component.

    Inheritance
    System.Object
    ScheduleHeaderRow
    Namespace: Syncfusion.Blazor.Schedule
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class ScheduleHeaderRow : OwningComponentBase
    Remarks

    Use this class to specify values for the corresponding properties to configure the header rows.

    Examples
    <SfSchedule TValue="AppointmentData">
        <ScheduleHeaderRows>
            <ScheduleHeaderRow Option="HeaderRowType.Week">
                <Template>
                    <div class="week-text">Week: @(GetWeekText((context as TemplateContext).Date))</div>
                </Template>
            </ScheduleHeaderRow>
            <ScheduleHeaderRow Option="HeaderRowType.Date"></ScheduleHeaderRow>
        </ScheduleHeaderRows>
    </SfSchedule>
    @code {
        public static string GetWeekText(DateTime date)
        {
            return CultureInfo.InvariantCulture.Calendar.GetWeekOfYear(date, CalendarWeekRule.FirstFourDayWeek, DayOfWeek.Monday).ToString();
        }
    }

    Constructors

    ScheduleHeaderRow()

    Declaration
    public ScheduleHeaderRow()

    Properties

    ChildContent

    Gets or sets the child content of header row.

    Declaration
    public RenderFragment ChildContent { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.RenderFragment

    The value used to build the content.

    Option

    It defines the header row type, which accepts either of the following values. Year Month Week Date Hour.

    Declaration
    public HeaderRowType Option { get; set; }
    Property Value
    Type Description
    HeaderRowType

    One of the HeaderRowType enumeration.

    Remarks

    If the HeaderRowType is Year, renders the year row in timeline view header. If the HeaderRowType is Month, renders the month row in timeline view header. If the HeaderRowType is Week, renders the week row in timeline view header. If the HeaderRowType is Date, renders the date row in timeline view header. If the HeaderRowType is Hour, renders the hour row in timeline view header.

    Template

    Gets or sets template as a Microsoft.AspNetCore.Components.RenderFragment<> that defines custom appearance for displaying the timeline view header rows.

    Declaration
    public RenderFragment<TemplateContext> Template { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.RenderFragment<TemplateContext>

    A template content that specifies the visualization of timeline view header rows. The default value is null.

    Examples
    <SfSchedule TValue="AppointmentData">
        <ScheduleHeaderRows>
            <ScheduleHeaderRow Option="HeaderRowType.Date">
                <Template>
                    <div class="date-text">Date: @(GetDateText((context as TemplateContext).Date))</div>
                </Template>
            </ScheduleHeaderRow>
            <ScheduleHeaderRow Option="HeaderRowType.Hour">
            <Template>
                    <div class="hour-text">hour: @(GetHourText((context as TemplateContext).Date))</div>
                </Template>
            </ScheduleHeaderRow>
        </ScheduleHeaderRows>
    </SfSchedule>
    @code {
        public static string GetDateText(DateTime date)
        {
            return date.ToString("dd ddd", CultureInfo.CurrentCulture);
        }
        public static string GetHourText(DateTime date)
        {
            return date.ToString("hh", CultureInfo.InvariantCulture);
        }
    }

    Methods

    BuildRenderTree(RenderTreeBuilder)

    Declaration
    protected override void BuildRenderTree(RenderTreeBuilder __builder)
    Parameters
    Type Name Description
    Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder

    Dispose(Boolean)

    Dispose unmanaged resources in the Syncfusion Blazor component.

    Declaration
    protected override void Dispose(bool disposing)
    Parameters
    Type Name Description
    System.Boolean disposing

    Boolean value to dispose the object.

    OnInitializedAsync()

    Declaration
    protected override Task OnInitializedAsync()
    Returns
    Type
    System.Threading.Tasks.Task

    OnParametersSetAsync()

    Declaration
    protected override Task OnParametersSetAsync()
    Returns
    Type
    System.Threading.Tasks.Task
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved