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
Namespace: Syncfusion.Blazor.Schedule
Assembly: Syncfusion.Blazor.dll
Syntax
public class ScheduleField : OwningComponentBaseExamples
<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
public RenderFragment ChildContent { get; set; }Property Value
| Type | Description | 
|---|---|
| Microsoft.AspNetCore.Components.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
public string CssClass { get; set; }Property Value
| Type | Description | 
|---|---|
| System.String | Accepts a string value. The default value is  | 
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
public string FollowingID { get; set; }Property Value
| Type | Description | 
|---|---|
| System.String | Accepts a string value. The default value is  | 
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
public string Id { get; set; }Property Value
| Type | Description | 
|---|---|
| System.String | Accepts a string value. The default value is  | 
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
public string IsBlock { get; set; }Property Value
| Type | Description | 
|---|---|
| System.String | Accepts a string value. The default value is  | 
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
public string IsReadonly { get; set; }Property Value
| Type | Description | 
|---|---|
| System.String | Accepts a string value. The default value is  | 
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 | 
|---|---|---|
| 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 |