alexa
menu

Blazor

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

    Show / Hide Table of Contents

    Class EventSettingsField

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

    Inheritance
    object
    ComponentBase
    OwningComponentBase
    SfOwningComponentBase
    SfBaseComponent
    EventSettingsField
    FieldDescription
    FieldEndTime
    FieldEndTimezone
    FieldIsAllDay
    FieldLocation
    FieldRecurrenceException
    FieldRecurrenceId
    FieldRecurrenceRule
    FieldStartTime
    FieldStartTimezone
    FieldSubject
    Implements
    IComponent
    IHandleEvent
    IHandleAfterRender
    IDisposable
    Inherited Members
    ComponentBase.Assets
    ComponentBase.AssignedRenderMode
    ComponentBase.BuildRenderTree(RenderTreeBuilder)
    ComponentBase.DispatchExceptionAsync(Exception)
    ComponentBase.InvokeAsync(Action)
    ComponentBase.InvokeAsync(Func<Task>)
    ComponentBase.OnAfterRender(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
    SfBaseComponent.Dispose()
    SfBaseComponent.Dispose(bool)
    SfBaseComponent.GetEffectivePlatform()
    SfBaseComponent.GetMainComponentPlatform()
    SfBaseComponent.IsMainLicenseComponent()
    SfBaseComponent.LicenseContext
    SfBaseComponent.OnAfterRenderAsync(bool)
    SfBaseComponent.OnObservableChange(string, object, bool, NotifyCollectionChangedEventArgs)
    SfBaseComponent.ValidateLicense()
    Namespace: Syncfusion.Blazor.Schedule
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class EventSettingsField : SfBaseComponent, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
    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
    [Parameter]
    public string Default { get; set; }
    Property Value
    Type Description
    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
    [Parameter]
    public string Name { get; set; }
    Property Value
    Type Description
    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
    [Parameter]
    public string Title { get; set; }
    Property Value
    Type Description
    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
    [Parameter]
    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
    Task

    Task.

    Overrides
    SfBaseComponent.OnInitializedAsync()

    OnParametersSetAsync()

    Triggers while dynamically updating the component properties.

    Declaration
    protected override Task OnParametersSetAsync()
    Returns
    Type Description
    Task

    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