menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class ScheduleEvents<TValue> - Blazor API Reference | Syncfusion

    Show / Hide Table of Contents

    Class ScheduleEvents<TValue>

    Provides event handlers for the SfSchedule<TValue> component.

    Inheritance
    System.Object
    ScheduleEvents<TValue>
    Namespace: Syncfusion.Blazor.Schedule
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class ScheduleEvents<TValue> : ComponentBase
    Type Parameters
    Name Description
    TValue

    The value type of the schedule component.

    Examples
    <SfSchedule TValue="AppointmentData">
        <ScheduleEvents TValue="AppointmentData" OnCellClick="TriggerCellClick" OnEventClick="TriggerEventClick"></ScheduleEvents>
    </SfSchedule>
    @code{
        private void TriggerCellClick(CellClickEventArgs args)
        {
            //write custom code.
        }
        private void TriggerEventClick(EventClickArgs<AppointmentData> args)
        {
            //write custom 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; }
        }
    }

    Constructors

    ScheduleEvents()

    Declaration
    public ScheduleEvents()

    Properties

    ActionCompleted

    Triggers upon successful completion of the scheduler actions.

    Declaration
    public EventCallback<ActionEventArgs<TValue>> ActionCompleted { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<ActionEventArgs<TValue>>

    An event callback function.

    Created

    Triggers after the SfSchedule<TValue> component is created.

    Declaration
    public EventCallback<object> Created { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<System.Object>

    An event callback function.

    DataBinding

    Triggers before the data is bound to the scheduler.

    Declaration
    public EventCallback<DataBindingEventArgs<TValue>> DataBinding { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<DataBindingEventArgs<TValue>>

    An event callback function.

    DataBound

    Triggers after the event data is bound to the scheduler.

    Declaration
    public EventCallback<DataBoundEventArgs<TValue>> DataBound { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<DataBoundEventArgs<TValue>>

    An event callback function.

    Destroyed

    Triggers when the SfSchedule<TValue> component is destroyed.

    Declaration
    public EventCallback<object> Destroyed { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<System.Object>

    An event callback function.

    Dragged

    Triggers when the dragging of an appointment is stopped.

    Declaration
    public EventCallback<DragEventArgs<TValue>> Dragged { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<DragEventArgs<TValue>>

    An event callback function.

    EventRendered

    Triggers before each event is rendered on the scheduler user interface.

    Declaration
    public EventCallback<EventRenderedArgs<TValue>> EventRendered { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<EventRenderedArgs<TValue>>

    An event callback function.

    ExcelExporting

    Triggers before the Excel export process begins, allowing for customization of the worksheet.

    Declaration
    public EventCallback<ExcelExportEventArgs> ExcelExporting { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<ExcelExportEventArgs>

    An event callback function that receives a ExcelExportEventArgs parameter.

    Remarks

    This event provides an opportunity to modify the Excel worksheet before it is exported. You can use this to add custom formatting, insert additional data, or perform any other necessary modifications to the worksheet.

    MoreEventsClicked

    Triggers when the more events indicator is clicked.

    Declaration
    public EventCallback<MoreEventsClickArgs> MoreEventsClicked { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<MoreEventsClickArgs>

    An event callback function.

    Navigating

    Triggers before the date or view is navigated on the scheduler.

    Declaration
    public EventCallback<NavigatingEventArgs> Navigating { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<NavigatingEventArgs>

    An event callback function.

    OnActionBegin

    Triggers at the beginning of every scheduler action.

    Declaration
    public EventCallback<ActionEventArgs<TValue>> OnActionBegin { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<ActionEventArgs<TValue>>

    An event callback function.

    OnActionFailure

    Triggers when a scheduler action fails or is interrupted, and returns error information.

    Declaration
    public EventCallback<ActionEventArgs<TValue>> OnActionFailure { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<ActionEventArgs<TValue>>

    An event callback function.

    OnCellClick

    Triggers when the scheduler cells are single-clicked or single-tapped on mobile devices.

    Declaration
    public EventCallback<CellClickEventArgs> OnCellClick { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<CellClickEventArgs>

    An event callback function.

    OnCellDoubleClick

    Triggers when the scheduler cells are double clicked.

    Declaration
    public EventCallback<CellClickEventArgs> OnCellDoubleClick { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<CellClickEventArgs>

    An event callback function.

    OnDragStart

    Triggers when an appointment starts a drag action.

    Declaration
    public EventCallback<DragEventArgs<TValue>> OnDragStart { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<DragEventArgs<TValue>>

    An event callback function.

    OnEventClick

    Triggers when the events are single-clicked or single-tapped on mobile devices.

    Declaration
    public EventCallback<EventClickArgs<TValue>> OnEventClick { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<EventClickArgs<TValue>>

    An event callback function.

    OnEventDoubleClick

    Triggers when the events are double clicked.

    Declaration
    public EventCallback<EventClickArgs<TValue>> OnEventDoubleClick { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<EventClickArgs<TValue>>

    An event callback function.

    OnPopupClose

    Triggers before any scheduler popups are closed on the page.

    Declaration
    public EventCallback<PopupCloseEventArgs<TValue>> OnPopupClose { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<PopupCloseEventArgs<TValue>>

    An event callback function.

    OnPopupOpen

    Triggers before any scheduler popups open on the page.

    Declaration
    public EventCallback<PopupOpenEventArgs<TValue>> OnPopupOpen { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<PopupOpenEventArgs<TValue>>

    An event callback function.

    OnRenderCell

    Triggers before each cell is rendered on the scheduler user interface.

    Declaration
    public EventCallback<RenderCellEventArgs> OnRenderCell { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<RenderCellEventArgs>

    An event callback function.

    OnResizeStart

    Triggers when an appointment is started to resize.

    Declaration
    public EventCallback<ResizeEventArgs<TValue>> OnResizeStart { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<ResizeEventArgs<TValue>>

    An event callback function.

    OnVirtualScrollStart

    Gets or sets the event callback function that is triggered when virtual scrolling is started.

    Declaration
    public EventCallback<ScrollEventArgs<TValue>> OnVirtualScrollStart { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<ScrollEventArgs<TValue>>

    An event callback function should accept a parameter of type ScrollEventArgs<T>.

    Remarks

    This event is applicable only when AllowVirtualScrolling and Resources properties are enabled.

    Examples
    <SfSchedule TValue="EventData" Width="100%" Height="600px">
       <ScheduleGroup Resources="@GroupData"></ScheduleGroup>
       <ScheduleResources>
           <ScheduleResource TItem = "ResourceData" TValue="int[]" DataSource="@ResourceDatasource" Field="ResourceId" Title="Resource" Name="Resources" TextField="Text" IdField="Id" ColorField="Color" AllowMultiple="true"></ScheduleResource>
       </ScheduleResources>
       <ScheduleViews>
           <ScheduleView Option="View.TimelineMonth" AllowVirtualScrolling="true"></ScheduleView>
       </ScheduleViews>
       <ScheduleEvents TValue="EventData" OnVirtualScrollStart="OnVirtualScrollStart"></ScheduleEvents>
    </SfSchedule>
    @code {
        public void OnVirtualScrollStart(ScrollEventArgs args)
        {
            //Customize the code in scroll start event.
        }
    }

    OnVirtualScrollStop

    Gets or sets the event callback function that is triggered when virtual scrolling is stopped.

    Declaration
    public EventCallback<ScrollEventArgs<TValue>> OnVirtualScrollStop { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<ScrollEventArgs<TValue>>

    An event callback function should accept a parameter of type ScrollEventArgs<T>.

    Remarks

    This event is applicable only when AllowVirtualScrolling and Resources properties are enabled.

    Examples
    <SfSchedule TValue="EventData" Width="100%" Height="600px">
       <ScheduleGroup Resources="@GroupData"></ScheduleGroup>
       <ScheduleResources>
           <ScheduleResource TItem = "ResourceData" TValue="int[]" DataSource="@ResourceDatasource" Field="ResourceId" Title="Resource" Name="Resources" TextField="Text" IdField="Id" ColorField="Color" AllowMultiple="true"></ScheduleResource>
       </ScheduleResources>
       <ScheduleViews>
           <ScheduleView Option="View.TimelineMonth" AllowVirtualScrolling="true"></ScheduleView>
       </ScheduleViews>
       <ScheduleEvents TValue="EventData" OnVirtualScrollStop="OnVirtualScrollStop"></ScheduleEvents>
    </SfSchedule>
    @code {
        private void OnVirtualScrollStop(ScrollEventArgs args)
        {
            //Customize the code in scroll stop event.
        }
    }

    Paste

    Triggers before an event is pasted in the scheduler.

    Declaration
    public EventCallback<PasteEventArgs<TValue>> Paste { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<PasteEventArgs<TValue>>

    An event callback function.

    Resized

    Triggers when the resizing of appointment is stopped.

    Declaration
    public EventCallback<ResizeEventArgs<TValue>> Resized { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<ResizeEventArgs<TValue>>

    An event callback function.

    TooltipOpening

    Occurs before an appointment tooltip is displayed in the schedule.

    Declaration
    public EventCallback<TooltipOpenEventArgs<TValue>> TooltipOpening { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<TooltipOpenEventArgs<TValue>>

    An Microsoft.AspNetCore.Components.EventCallback<> of type TooltipOpenEventArgs<T>.

    Remarks

    Use this event to prevent the tooltip display. Set Cancel to true to prevent the tooltip. Access appointment data via Data.

    Methods

    OnInitializedAsync()

    Declaration
    protected override Task OnInitializedAsync()
    Returns
    Type
    System.Threading.Tasks.Task
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved