Blazor

Upgrade Guide User Guide Demos Support Forums Download
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class ScheduleView - Blazor API Reference | Syncfusion

    Show / Hide Table of Contents

    Class ScheduleView

    Configures the view-specific settings on scheduler.

    Inheritance
    System.Object
    SfBaseComponent
    SfDataBoundComponent
    ScheduleView
    Inherited Members
    SfDataBoundComponent.SetDataManager<T>(Object)
    SfDataBoundComponent.OnAfterRenderAsync(Boolean)
    SfDataBoundComponent.DataManager
    SfDataBoundComponent.MainParent
    SfBaseComponent.Dispose()
    SfBaseComponent.Dispose(Boolean)
    SfBaseComponent.OnObservableChange(String, Object, Boolean, NotifyCollectionChangedEventArgs)
    Namespace: Syncfusion.Blazor.Schedule
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class ScheduleView : SfDataBoundComponent

    Constructors

    ScheduleView()

    Declaration
    public ScheduleView()

    Properties

    AllowVirtualScrolling

    It is used to allow or disallow the virtual scrolling functionality. This is applicable only on Timeline views and Agenda view.

    Declaration
    public bool AllowVirtualScrolling { get; set; }
    Property Value
    Type Description
    System.Boolean

    CellHeaderTemplate

    Defines the header template on the month date cells. This template is only applicable for month view day cells.

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

    CellTemplate

    The template option which is used to render the customized work cells on the Schedule. The field accessible via template is Date. It gets applied only to the view objects on which it is defined.

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

    ChildContent

    Defines the child content.

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

    DateFormat

    By default, Schedule follows the date-format as per the default culture assigned to it. It is also possible to manually set specific date format by using the DateFormat property. The format of the date range label in the header bar depends on the DateFormat value or else based on the current culture. It gets applied only to the view objects on which it is defined.

    Declaration
    public string DateFormat { get; set; }
    Property Value
    Type Description
    System.String

    DateHeaderTemplate

    Defines the date header template.

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

    DayHeaderTemplate

    Defines the day header template.

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

    DisplayDate

    Gets or sets the starting week date at an initial rendering of month view.

    Declaration
    public Nullable<DateTime> DisplayDate { get; set; }
    Property Value
    Type Description
    System.Nullable<System.DateTime>
    Remarks

    DisplayDate property is only applicable for month view. If this property value is not set, then the month view will be rendered from the first week of the month.

    Examples
    <SfSchedule TValue="AppointmentData">
        <ScheduleViews>
           <ScheduleView Option="View.Month" NumberOfWees="6" DisplayDate=”new DateTime(2021, 11, 17)”></ScheduleView>
       </ScheduleViews>
    </SfSchedule>

    DisplayName

    When the same view is customized with different intervals, this property allows the user to set different display name for those views.

    Declaration
    public string DisplayName { get; set; }
    Property Value
    Type Description
    System.String

    EnableVirtualMask

    Enable or disable the virtual mask to the work cells for virtual scrolling actions.

    Declaration
    public bool EnableVirtualMask { get; set; }
    Property Value
    Type Description
    System.Boolean
    Remarks

    The Virtual Mask allows it to render only work cells visible within the view-port without buffering the entire resource collection. Here, same set of DOM elements is re-used to improve the performance. In this feature, a loading placeholder indicator was shown while loading the new data.

    Examples
    
    
    
    
    
    
    
    
    

    EndHour

    It is used to specify the end hour, at which the Schedule ends. It too accepts the time string in a short skeleton format.

    Declaration
    public string EndHour { get; set; }
    Property Value
    Type Description
    System.String

    EventTemplate

    Defines the event template. All the event fields mapped to Schedule from dataSource can be accessed within this template code. It is similar to that of the Template option available within the ScheduleEventSettings, whereas it will get applied only on the events of the view to which it is currently being defined.

    Declaration
    public RenderFragment<object> EventTemplate { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.RenderFragment<System.Object>

    FirstDayOfWeek

    This option allows the user to set the first day of a week on Schedule. It should be based on current culture and each culture defines its own first day of week values. If needed, the user can set it manually on his own by defining the value through this property. It usually accepts the integer values, whereby 0 is always denoted as Sunday, 1 as Monday and so on.

    Declaration
    public int FirstDayOfWeek { get; set; }
    Property Value
    Type Description
    System.Int32

    FirstMonthOfYear

    It allows the user to set the first month of the year.It accepts the integer values, whereby 1 is always denoted as January, 2 for February and so on.

    Declaration
    public int FirstMonthOfYear { get; set; }
    Property Value
    Type Description
    System.Int32

    HeaderIndentTemplate

    Defines the header indent template.

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

    HeaderRows

    Allows defining the collection of custom header rows to display the year, month, week, date and hour label as an individual row on the timeline view of the scheduler.

    Declaration
    public List<HeaderRowsModel> HeaderRows { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.List<HeaderRowsModel>

    Interval

    It accepts the number value denoting to include the number of days, weeks, workweeks or months on the defined view type.

    Declaration
    public int Interval { get; set; }
    Property Value
    Type Description
    System.Int32

    IsSelected

    To denote whether the view name given on the Option is active or not. It acts similar to the CurrentView property and defines the active view of Schedule.

    Declaration
    public bool IsSelected { get; set; }
    Property Value
    Type Description
    System.Boolean

    MaxEventsPerRow

    It is used to set the maximum events count in a row when we disabled the EnableAutoRowHeight property.

    Declaration
    public int MaxEventsPerRow { get; set; }
    Property Value
    Type Description
    System.Int32

    MonthHeaderTemplate

    Defines the month header template.

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

    NumberOfWeeks

    Gets or sets the number of weeks that is shown in the month view.

    Declaration
    public int NumberOfWeeks { get; set; }
    Property Value
    Type Description
    System.Int32

    The number of weeks shown in the month view. The default is derived from number of weeks in current month.

    Remarks

    NumberOfWeeks property is only applicable for month view. Use DisplayDate property to customize the starting week of month.

    Examples
    <SfSchedule TValue="AppointmentData">
        <ScheduleViews>
           <ScheduleView Option="View.Month" NumberOfWees="6"></ScheduleView>
       </ScheduleViews>
    </SfSchedule>

    Option

    It accepts the schedule view name, based on which we can define with its related properties in a single object. The applicable view names are, Day Week WorkWeek Month Agenda MonthAgenda TimelineDay TimelineWeek TimelineWorkWeek TimelineMonth TimelineYear.

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

    Orientation

    It is used to specify the year view rendering orientation on the schedule.

    Declaration
    public Orientation Orientation { get; set; }
    Property Value
    Type Description
    Orientation

    Readonly

    When set to true, displays a quick popup with cell or event details on single clicking over the cells or on events. By default, it is set to false. It gets applied only to the view objects on which it is defined.

    Declaration
    public bool Readonly { get; set; }
    Property Value
    Type Description
    System.Boolean

    ResourceHeaderTemplate

    The template option which is used to render the customized header cells on the schedule. All the resource fields mapped within resources can be accessed within this template. It gets applied only to the view objects on which it is defined.

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

    ShowWeekend

    When set to false, it hides the weekend days of a week from the Schedule. The days which are not defined in the working days collection are usually treated as weekend days. Note: By default, this option is not applicable on Work Week view. For example, if the working days are defined as [1, 2, 3, 4], then the remaining days of that week will be considered as the weekend days and will be hidden on all the views.

    Declaration
    public bool ShowWeekend { get; set; }
    Property Value
    Type Description
    System.Boolean

    ShowWeekNumber

    When set to true, displays the week number of the current view date range.

    Declaration
    public bool ShowWeekNumber { get; set; }
    Property Value
    Type Description
    System.Boolean

    StartHour

    It is used to specify the starting hour, from which the Schedule starts to display. It accepts the time string in a short skeleton format and also, hides the time beyond the specified start time.

    Declaration
    public string StartHour { get; set; }
    Property Value
    Type Description
    System.String

    VirtualResourceCount

    Gets or sets the number of resources to be renders only in the content viewport.

    Declaration
    public Nullable<int> VirtualResourceCount { get; set; }
    Property Value
    Type Description
    System.Nullable<System.Int32>
    Remarks

    VirtualResourceCount property is only applicable for resources virtual scrolling in timeline views. If this property value is not set, then the number of resources to be displayed in the scheduler is determined implicitly by height of the content area. The provided count must be two times larger than the number of visible resources in the scheduler.

    Examples
    <SfSchedule TValue="EventData" Height="550px">
       <ScheduleGroup Resources="@GroupData"></ScheduleGroup>
       <ScheduleResources>
           <ScheduleResource TItem = "ResourceData" TValue="int[]" DataSource="@ResourceDatasource" Field="ResourceId" Title="Resource" Name="Resources" TextField="Text" IdField="Id" ColorField="Color" AllowMultiple="true"></ScheduleResource>
       </ScheduleResources>
       <ScheduleViews>
           <ScheduleView Option="View.TimelineMonth" AllowVirtualScrolling="true" VirtualResourceCount="20"></ScheduleView>
       </ScheduleViews>
    </SfSchedule>
    See Also
    AllowVirtualScrolling

    WorkDays

    It is used to set the working days on schedule. The only days that are defined in this collection will be rendered on the WorkWeek view whereas on other views, it will display all the usual days and simply highlights the working days with different shade.

    Declaration
    public int[] WorkDays { get; set; }
    Property Value
    Type Description
    System.Int32[]

    Methods

    BuildRenderTree(RenderTreeBuilder)

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

    OnInitializedAsync()

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

    OnParametersSetAsync()

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