alexa
menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Search Results for

    Show / Hide Table of Contents

    Class ScheduleField

    A class that represents the collection of event fields that requires to be mapped with the dataSource fields within the ScheduleEventSettings<TValue> tag directive.

    Inheritance
    object
    ComponentBase
    OwningComponentBase
    SfOwningComponentBase
    ScheduleField
    Implements
    IComponent
    IHandleEvent
    IHandleAfterRender
    IDisposable
    Inherited Members
    ComponentBase.Assets
    ComponentBase.AssignedRenderMode
    ComponentBase.DispatchExceptionAsync(Exception)
    ComponentBase.InvokeAsync(Action)
    ComponentBase.InvokeAsync(Func<Task>)
    ComponentBase.OnAfterRender(bool)
    ComponentBase.OnAfterRenderAsync(bool)
    ComponentBase.OnInitialized()
    ComponentBase.OnParametersSet()
    ComponentBase.RendererInfo
    ComponentBase.SetParametersAsync(ParameterView)
    ComponentBase.ShouldRender()
    ComponentBase.StateHasChanged()
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    OwningComponentBase.IsDisposed
    OwningComponentBase.ScopedServices
    Namespace: Syncfusion.Blazor.Schedule
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class ScheduleField : SfOwningComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
    Examples
    <SfSchedule TValue="AppointmentData">
        <ScheduleEventSettings TValue="AppointmentData" DataSource="@DataSource">
            <ScheduleField Id="TravelId" IsBlock="Disabled" IsReadonly="ReadOnly"></ScheduleField>
        </ScheduleEventSettings>
    </SfSchedule>
    @code{
        List<AppointmentData> DataSource = new List<AppointmentData>
        {
            new AppointmentData { TravelId = 1, Subject = "Meeting", StartTime = DateTime.Today.Date.AddHours(9).AddMinutes(30), EndTime = DateTime.Today.Date.AddHours(11), ReadOnly = true, Disabled = false }
        };
        public class AppointmentData
        {
            public int TravelId { get; set; }
            public string Subject { get; set; }
            public string Location { get; set; }
            public DateTime StartTime { get; set; }
            public DateTime EndTime { get; set; }
            public bool ReadOnly { get; set; }
            public bool Disabled { get; set; }
        }
    }

    Constructors

    ScheduleField()

    Declaration
    public ScheduleField()

    Properties

    ChildContent

    Gets or sets the child content for the event settings field.

    Declaration
    [Parameter]
    public RenderFragment ChildContent { get; set; }
    Property Value
    Type Description
    RenderFragment

    The value used to build the content.

    CssClass

    Gets or sets the CssClass field mapped from dataSource used to customize the event styles.

    Declaration
    [Parameter]
    public string CssClass { get; set; }
    Property Value
    Type Description
    string

    Accepts a string value. The default value is null.

    Examples

    In the below code example, CustomClass is mapped for CssClass event field property.

    <SfSchedule TValue="AppointmentData">
        <ScheduleEventSettings TValue="AppointmentData">
            <ScheduleField CssClass="CustomClass">
            </ScheduleField>
        </ScheduleEventSettings>
    </SfSchedule>
    @code{
        public class AppointmentData
        {
            public int Id { get; set; }
            public string Subject { get; set; }
            public string Location { get; set; }
            public DateTime StartTime { get; set; }
            public DateTime EndTime { get; set; }
            public string CustomClass { get; set; }
        }
    }

    FollowingID

    Gets or sets the FollowingID field mapped from dataSource. It holds the Id value of main parent event.

    Declaration
    [Parameter]
    public string FollowingID { get; set; }
    Property Value
    Type Description
    string

    Accepts a string value. The default value is null.

    Examples

    In the below code example, FollowId is mapped for FollowingID event field property.

    <SfSchedule TValue="AppointmentData">
        <ScheduleEventSettings TValue="AppointmentData">
            <ScheduleField FollowingID="FollowId">
            </ScheduleField>
        </ScheduleEventSettings>
    </SfSchedule>
    @code{
        public class AppointmentData
        {
            public int Id { get; set; }
            public string Subject { get; set; }
            public string Location { get; set; }
            public DateTime StartTime { get; set; }
            public DateTime EndTime { get; set; }
            public int FollowId { get; set; }
        }
    }

    Id

    Gets or sets the Id field mapped from dataSource used to set unique id for events.

    Declaration
    [Parameter]
    public string Id { get; set; }
    Property Value
    Type Description
    string

    Accepts a string value. The default value is null.

    Remarks

    This field is mandatory when dataSource is bound to scheduler.

    Examples

    In the below code example, TravelId is mapped for Id event field property.

    <SfSchedule TValue="AppointmentData">
        <ScheduleEventSettings TValue="AppointmentData">
            <ScheduleField Id="TravelId">
            </ScheduleField>
        </ScheduleEventSettings>
    </SfSchedule>
    @code{
        public class AppointmentData
        {
            public int TravelId { get; set; }
            public string Subject { get; set; }
            public string Location { get; set; }
            public DateTime StartTime { get; set; }
            public DateTime EndTime { get; set; }
        }
    }

    IsBlock

    Gets or sets the IsBlock field mapped from dataSource used to block specific time.

    Declaration
    [Parameter]
    public string IsBlock { get; set; }
    Property Value
    Type Description
    string

    Accepts a string value. The default value is null.

    Examples

    In the below code example, Disabled is mapped for IsBlock event field property.

    <SfSchedule TValue="AppointmentData">
        <ScheduleEventSettings TValue="AppointmentData">
            <ScheduleField IsBlock="Disabled">
            </ScheduleField>
        </ScheduleEventSettings>
    </SfSchedule>
    @code{
        public class AppointmentData
        {
            public int Id { get; set; }
            public string Subject { get; set; }
            public string Location { get; set; }
            public DateTime StartTime { get; set; }
            public DateTime EndTime { get; set; }
            public bool Disabled { get; set; }
        }
    }

    IsReadonly

    Gets or sets the IsReadonly field mapped from dataSource used to prevent the CRUD actions on specific events.

    Declaration
    [Parameter]
    public string IsReadonly { get; set; }
    Property Value
    Type Description
    string

    Accepts a string value. The default value is null.

    Examples

    In the below code example, ReadOnly is mapped for IsReadonly event field property.

    <SfSchedule TValue="AppointmentData">
        <ScheduleEventSettings TValue="AppointmentData">
            <ScheduleField IsReadonly="ReadOnly">
            </ScheduleField>
        </ScheduleEventSettings>
    </SfSchedule>
    @code{
        public class AppointmentData
        {
            public int Id { get; set; }
            public string Subject { get; set; }
            public string Location { get; set; }
            public DateTime StartTime { get; set; }
            public DateTime EndTime { get; set; }
            public bool ReadOnly { get; set; }
        }
    }

    Methods

    BuildRenderTree(RenderTreeBuilder)

    Declaration
    protected override void BuildRenderTree(RenderTreeBuilder __builder)
    Parameters
    Type Name Description
    RenderTreeBuilder __builder
    Overrides
    ComponentBase.BuildRenderTree(RenderTreeBuilder)

    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
    OwningComponentBase.Dispose(bool)

    OnInitializedAsync()

    Declaration
    protected override Task OnInitializedAsync()
    Returns
    Type
    Task
    Overrides
    ComponentBase.OnInitializedAsync()

    OnParametersSetAsync()

    Declaration
    protected override Task OnParametersSetAsync()
    Returns
    Type
    Task
    Overrides
    ComponentBase.OnParametersSetAsync()

    Implements

    IComponent
    IHandleEvent
    IHandleAfterRender
    IDisposable
    In this article
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved