Class ScheduleHeaderRow
A class that represents the timeline view headers on the SfSchedule<TValue> component.
Inherited Members
Namespace: Syncfusion.Blazor.Schedule
Assembly: Syncfusion.Blazor.dll
Syntax
public class ScheduleHeaderRow : SfOwningComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
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
[Parameter]
public RenderFragment ChildContent { get; set; }
Property Value
| Type | Description |
|---|---|
| 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
[Parameter]
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 RenderFragment<TValue> that defines custom appearance for displaying the timeline view header rows.
Declaration
[Parameter]
public RenderFragment<TemplateContext> Template { get; set; }
Property Value
| Type | Description |
|---|---|
| RenderFragment<TemplateContext> | A template content that specifies the visualization of timeline view header rows. The default value is |
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 |
|---|---|---|
| RenderTreeBuilder | __builder |
Overrides
Dispose(bool)
Dispose unmanaged resources in the Syncfusion Blazor component.
Declaration
protected override void Dispose(bool disposing)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | disposing | Boolean value to dispose the object. |
Overrides
OnInitializedAsync()
Declaration
protected override Task OnInitializedAsync()
Returns
| Type |
|---|
| Task |
Overrides
OnParametersSetAsync()
Declaration
protected override Task OnParametersSetAsync()
Returns
| Type |
|---|
| Task |