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.
Inherited Members
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 |
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 |
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 |
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 |
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 |
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
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 |