menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class EventSettingsField - Blazor API Reference | Syncfusion

    Show / Hide Table of Contents

    Class EventSettingsField

    A class that represents event settings field of SfSchedule<TValue> component.

    Inheritance
    System.Object
    SfBaseComponent
    EventSettingsField
    FieldDescription
    FieldEndTime
    FieldEndTimezone
    FieldIsAllDay
    FieldLocation
    FieldRecurrenceException
    FieldRecurrenceId
    FieldRecurrenceRule
    FieldStartTime
    FieldStartTimezone
    FieldSubject
    Inherited Members
    SfBaseComponent.Dispose()
    SfBaseComponent.Dispose(Boolean)
    SfBaseComponent.OnAfterRenderAsync(Boolean)
    SfBaseComponent.OnObservableChange(String, Object, Boolean, NotifyCollectionChangedEventArgs)
    Namespace: Syncfusion.Blazor.Schedule
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class EventSettingsField : SfBaseComponent
    Remarks

    You can map the custom field names, labels and validation for event fields by specifying value to corresponding property.

    Examples

    In the below code example, subject and location field name were changed and validation were applied using ScheduleField tag directive.

    <SfSchedule TValue="AppointmentData">
        <ScheduleEventSettings TValue="AppointmentData" DataSource="@DataSource">
            <ScheduleField>
                <FieldSubject Name="Title" Title="Travel Summary" Validation="@validationRules"></FieldSubject>
                <FieldLocation Name="Place" Title="Source" Default="Chennai" Validation="@locationValidationRules"></FieldLocation>
            </ScheduleField>
        </ScheduleEventSettings>
    </SfSchedule>
    @code{
        ValidationRules validationRules = new ValidationRules { Required = true };
        ValidationRules locationValidationRules = new ValidationRules { Required = true, RegexPattern = "^[a-zA-Z0-9- ]*$", Messages = new Dictionary<string, object>() { { "regex", "Special characters are not allowed" } } };
        List<AppointmentData> DataSource = new List<AppointmentData>
        {
            new AppointmentData { Id = 1, Title = "Meeting", StartTime = DateTime.Today.Date.AddHours(9).AddMinutes(30), EndTime = DateTime.Today.Date.AddHours(11) }
        };
        public class AppointmentData
        {
            public int Id { get; set; }
            public string Title { get; set; }
            public string Place { get; set; }
            public DateTime StartTime { get; set; }
            public DateTime EndTime { get; set; }
        }
    }

    Constructors

    EventSettingsField()

    Declaration
    public EventSettingsField()

    Properties

    Default

    Gets or sets the specific default value to the fields, when no value is provided to those fields from dataSource.

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

    Accepts a string value. The default value is null.

    Examples
    <SfSchedule TValue="AppointmentData">
        <ScheduleEventSettings TValue="AppointmentData">
            <ScheduleField>
                <FieldLocation Default="Chennai"></FieldLocation>
            </ScheduleField>
        </ScheduleEventSettings>
    </SfSchedule>

    Name

    Gets or sets the field name to be mapped from the dataSource for every event fields.

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

    Accepts a string value. The default value is null.

    Examples
    <SfSchedule TValue="AppointmentData">
        <ScheduleEventSettings TValue="AppointmentData">
            <ScheduleField>
                <FieldSubject Name="Title"></FieldSubject>
            </ScheduleField>
        </ScheduleEventSettings>
    </SfSchedule>

    Title

    Gets or sets the label values to be displayed for the event editor fields.

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

    Accepts a string value. The default value is null.

    Examples
    <SfSchedule TValue="AppointmentData">
        <ScheduleEventSettings TValue="AppointmentData">
            <ScheduleField>
                <FieldSubject Title="Travel Summary"></FieldSubject>
            </ScheduleField>
        </ScheduleEventSettings>
    </SfSchedule>

    Validation

    Gets or sets the validation rules to be applied for event fields within the event editor.

    Declaration
    public ValidationRules Validation { get; set; }
    Property Value
    Type Description
    ValidationRules

    Accepts a ValidationRules value. The default value is null.

    Examples
    <SfSchedule TValue="AppointmentData">
        <ScheduleEventSettings TValue="AppointmentData">
            <ScheduleField>
                <FieldSubject Validation="@validationRules"></FieldSubject>
            </ScheduleField>
        </ScheduleEventSettings>
    </SfSchedule>
    @code{
        ValidationRules validationRules = new ValidationRules { Required = true };
    }

    Methods

    OnInitializedAsync()

    Method invoked when the component is ready to start.

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

    Task.

    Overrides
    SfBaseComponent.OnInitializedAsync()

    OnParametersSetAsync()

    Triggers while dynamically updating the component properties.

    Declaration
    protected override Task OnParametersSetAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    Task.

    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved