alexa
menu

Blazor

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

    Show / Hide Table of Contents

    Class ScheduleEventSettings<TValue>

    A class that represents event settings for configuring the scheduler events.

    Inheritance
    object
    ComponentBase
    OwningComponentBase
    SfOwningComponentBase
    SfBaseComponent
    SfDataBoundComponent
    ScheduleEventSettings<TValue>
    Implements
    IComponent
    IHandleEvent
    IHandleAfterRender
    IDisposable
    IScheduleEventSettings
    Inherited Members
    ComponentBase.Assets
    ComponentBase.AssignedRenderMode
    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.OnObservableChange(string, object, bool, NotifyCollectionChangedEventArgs)
    SfBaseComponent.ValidateLicense()
    SfDataBoundComponent.DataManager
    SfDataBoundComponent.MainParent
    SfDataBoundComponent.OnAfterRenderAsync(bool)
    SfDataBoundComponent.SetDataManager<T>(object)
    Namespace: Syncfusion.Blazor.Schedule
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class ScheduleEventSettings<TValue> : SfDataBoundComponent, IComponent, IHandleEvent, IHandleAfterRender, IDisposable, IScheduleEventSettings
    Type Parameters
    Name Description
    TValue

    A type which provides schema for the events.

    Remarks

    You can configure the scheduler events using ScheduleEventSettings<TValue> tag directive.

    Examples
    <SfSchedule TValue="AppointmentData">
        <ScheduleEventSettings TValue="AppointmentData" DataSource="@DataSource"></ScheduleEventSettings>
    </SfSchedule>
    @code{
        List<AppointmentData> DataSource = new List<AppointmentData>
        {
            new AppointmentData { Id = 1, Subject = "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 Subject { get; set; }
            public string Location { get; set; }
            public DateTime StartTime { get; set; }
            public DateTime EndTime { get; set; }
        }
    }

    Constructors

    ScheduleEventSettings()

    Declaration
    public ScheduleEventSettings()

    Properties

    AllowAdding

    Gets or sets a value indicating whether new events can be added to the scheduler.

    Declaration
    [Parameter]
    public bool AllowAdding { get; set; }
    Property Value
    Type Description
    bool

    false to restrict the ability to add events. The default value true is set.

    AllowDeleting

    Gets or sets a value indicating whether events can be deleted from the Scheduler.

    Declaration
    [Parameter]
    public bool AllowDeleting { get; set; }
    Property Value
    Type Description
    bool

    false to restrict the ability to delete events. The default value true is set.

    AllowEditFollowingEvents

    Gets or sets a value indicating whether only future events in a series can be edited.

    Declaration
    [Parameter]
    public bool AllowEditFollowingEvents { get; set; }
    Property Value
    Type Description
    bool

    true to allow editing of only future events in a series. The default value is false.

    AllowEditing

    Gets or sets a value indicating whether events can be edited in the Scheduler.

    Declaration
    [Parameter]
    public bool AllowEditing { get; set; }
    Property Value
    Type Description
    bool

    false to restrict the ability to edit events. The default value true is set.

    ChildContent

    Gets or sets the child content for schedule event settings.

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

    The value used to build the content.

    Examples

    In the below example SfDataManager is rendered as child content to bind remote data to scheduler.

    <SfSchedule TValue="AppointmentData">
        <ScheduleEventSettings TValue="AppointmentData">
            <SfDataManager Url="https://ej2services.syncfusion.com/production/web-services/api/Schedule" Adaptor="@Syncfusion.Blazor.Adaptors.WebApiAdaptor"></SfDataManager>
        </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; }
        }
    }

    DataSource

    The collection of events to display in the Scheduler.

    Declaration
    [Parameter]
    public IEnumerable<TValue> DataSource { get; set; }
    Property Value
    Type Description
    IEnumerable<TValue>

    The collection should be of type IEnumerable<T>.

    EnableIndicator

    Gets or sets whether events can occupy the full height of the cell, excluding the header and more indicator.

    Declaration
    [Parameter]
    public bool EnableIndicator { get; set; }
    Property Value
    Type Description
    bool

    true to allow events to occupy the full height of the cell, excluding the header and more indicator. The default value is false.

    Remarks

    This property is applicable only when EnableMaxHeight is enabled. The "more" indicator is only shown when there is more than one appointment on a single cell.

    EnableMaxHeight

    Gets or sets whether events can occupy the full height of the cell, excluding the header.

    Declaration
    [Parameter]
    public bool EnableMaxHeight { get; set; }
    Property Value
    Type Description
    bool

    true to allow events to occupy the full height of the cell, excluding the header. The default value is false.

    EnableTooltip

    Gets or sets whether a tooltip is displayed for events, showing the subject, location, start and end time.

    Declaration
    [Parameter]
    public bool EnableTooltip { get; set; }
    Property Value
    Type Description
    bool

    true to display a tooltip for events. The default value is false.

    IgnoreWhitespace

    Gets or sets whether the bottom white space of the Events element should be ignored or included.

    Declaration
    [Parameter]
    public bool IgnoreWhitespace { get; set; }
    Property Value
    Type Description
    bool

    true to ignore the bottom white space. The default value false is set.

    Remarks

    This property is applicable only when EnableAutoRowHeight is enabled.

    IncludeFiltersInQuery

    Gets or sets a value that determines whether the start date and end date filter conditions should be included in the query itself when requesting data from the server, or passed as query parameters in the API call.

    Declaration
    [Parameter]
    public bool IncludeFiltersInQuery { get; set; }
    Property Value
    Type Description
    bool

    Set to true to include the start and end date filter conditions in the query itself, or set to false to pass the filter conditions as query parameters in the API call. The default value is false.

    Remarks

    Setting this property to true can result in better performance, as the filter conditions will be part of the query itself, potentially reducing the size of the request and minimizing the time needed to parse the response. However, it can also lead to longer query strings, which could result in issues with maximum URL length or server limitations on query string length.

    MinimumEventDuration

    Gets or sets the minimum duration for an event, where events with a shorter duration will be rendered for this minimum duration.

    Declaration
    [Parameter]
    public int MinimumEventDuration { get; set; }
    Property Value
    Type Description
    int

    Accepts a value of integer type, representing minutes. The default value is 1 minute.

    Remarks

    The events will be rendered using the MinimumEventDuration property if their duration is less than the MinimumEventDuration property value.

    Query

    Gets or sets an external Query to be executed during data processing.

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

    Accepts Query value.

    ResourceColorField

    Gets or sets the name of the resource to apply the color of that resource level to appointments when grouping is enabled.

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

    A string value representing the name of the resource.

    Remarks

    When grouping is enabled on the Scheduler, this property allows you to specify which resource's color should be applied to appointments.

    SortBy

    Gets or sets the field by which the scheduler events should be sorted.

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

    A string value representing the event field to sort by.

    Remarks

    The property value should correspond to a field in the Scheduler's events.

    SpannedEventPlacement

    Get or sets how spanned events (events with a duration of more than 24 hours) are rendered in the Scheduler.

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

    Accepts a SpannedEventPlacement enum value. The default value is AllDayRow.

    Remarks

    Spanned events can be rendered in the all-day row or within time slots, depending on this property. This property is only applicable for the day, week, and workweek views.

    Template

    Gets or sets template as a RenderFragment that defines custom appearance for displaying scheduler events.

    Declaration
    [Parameter]
    public RenderFragment<object> Template { get; set; }
    Property Value
    Type Description
    RenderFragment<object>

    A template content that specifies the visualization of a scheduler event. The default value is null.

    Examples
    <SfSchedule TValue="AppointmentData">
        <ScheduleEventSettings TValue="AppointmentData" DataSource="@DataSource">
            <Template>
                <div>Subject: @((context as AppointmentData).Subject)</div>
                <div>StartTime: @((context as AppointmentData).StartTime)</div>
                <div>EndTime:  @((context as AppointmentData).EndTime)</div>
            </Template>
        </ScheduleEventSettings>
    </SfSchedule>
    @code{
        List<AppointmentData> DataSource = new List<AppointmentData>
        {
            new AppointmentData { Id = 1, Subject = "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 Subject { get; set; }
            public string Location { get; set; }
            public DateTime StartTime { get; set; }
            public DateTime EndTime { get; set; }
        }
    }

    TooltipTemplate

    Gets or sets template as a RenderFragment that defines custom appearance for displaying event tooltip.

    Declaration
    [Parameter]
    public RenderFragment<object> TooltipTemplate { get; set; }
    Property Value
    Type Description
    RenderFragment<object>

    A template content that specifies the visualization of event tooltip. The default value is null.

    Examples
    <SfSchedule TValue="AppointmentData">
        <ScheduleEventSettings TValue="AppointmentData" DataSource="@DataSource">
            <TooltipTemplate>
                <div class="tooltip-wrap">
                    <div>@((context as AppointmentData).Subject)</div>
                    <div>From&nbsp;:&nbsp;@((context as AppointmentData).StartTime)</div>
                    <div>To&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:&nbsp;@((context as AppointmentData).EndTime) </div>
                </div>
            </TooltipTemplate>
        </ScheduleEventSettings>
    </SfSchedule>
    @code{
        List<AppointmentData> DataSource = new List<AppointmentData>
        {
            new AppointmentData { Id = 1, Subject = "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 Subject { get; set; }
            public string Location { get; set; }
            public DateTime StartTime { get; set; }
            public DateTime EndTime { get; set; }
        }
    }

    Methods

    BuildRenderTree(RenderTreeBuilder)

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

    OnInitializedAsync()

    Method invoked when the component is ready to start.

    Declaration
    protected override Task OnInitializedAsync()
    Returns
    Type Description
    Task

    A System.Threading.Tasks.Task representing any asynchronous operation.

    Overrides
    SfDataBoundComponent.OnInitializedAsync()

    OnParametersSetAsync()

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

    Implements

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