Class SfSchedule<TValue>
A component that displays a list of events scheduled at specific dates and times, helping users plan and manage their schedule.
Implements
Inherited Members
Namespace: Syncfusion.Blazor.Schedule
Assembly: Syncfusion.Blazor.dll
Syntax
public class SfSchedule<TValue> : SfBaseComponent, ISchedule
Type Parameters
Name | Description |
---|---|
TValue | A type that provides a schema for the schedule events. |
Remarks
You can configure the schedule with resource grouping, timescale, work hours, event settings, views, header rows and templates by specifying the respective tag directive.
Examples
In the below code example, a basic schedule component is initialized with ScheduleViews and ScheduleEventSettings<TValue>.
<SfSchedule TValue="AppointmentData" Height="550px" @bind-SelectedDate="@currentDate" @bind-CurrentView="currentView">
<ScheduleViews>
<ScheduleView Option="View.Day"></ScheduleView>
<ScheduleView Option="View.Week"></ScheduleView>
<ScheduleView Option="View.Month"></ScheduleView>
<ScheduleView Option="View.TimelineDay"></ScheduleView>
<ScheduleView Option="View.TimelineWeek"></ScheduleView>
<ScheduleView Option="View.TimelineMonth"></ScheduleView>
</ScheduleViews>
<ScheduleEventSettings TValue="AppointmentData" DataSource="@DataSource"></ScheduleEventSettings>
</SfSchedule>
@code{
private DateTime currentDate { get; set; } = DateTime.Today;
private View currentView { get; set; } = View.Month;
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
SfSchedule()
Declaration
public SfSchedule()
Properties
AgendaDaysCount
Gets or sets the number of days to be displayed in Agenda View by default. When using virtual scrolling, this value determines the number of days that will be fetched on each scroll-end.
Declaration
public int AgendaDaysCount { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | Accepts an integer value. The default value is |
AllowDragAndDrop
Gets or sets whether the scheduler appointments can be dragged and dropped over work cells.
Declaration
public bool AllowDragAndDrop { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | A boolean value indicating whether drag and drop is enabled. The default value is |
Remarks
When an appointment is dragged, both its start and end time will change simultaneously, allowing the appointment to be rescheduled for a different time.
AllowInline
Gets or sets the ability to create and edit appointments in-line in the scheduler.
Declaration
public bool AllowInline { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | A boolean value indicating whether in-line creation and editing is enabled. The default value is |
Remarks
If this property is set to true
, the quick popup for appointments will not open.
AllowKeyboardInteraction
Gets or sets the ability to use keyboard input in the scheduler.
Declaration
public bool AllowKeyboardInteraction { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | A boolean value indicating whether keyboard interaction is enabled. The default value is |
AllowMultiCellSelection
Gets or sets the ability to select multiple cells in the scheduler.
Declaration
public bool AllowMultiCellSelection { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | A boolean value indicating whether multiple cell selection is allowed. The default value is |
AllowMultiDrag
Gets or sets the ability to drag multiple selected appointments in the scheduler.
Declaration
public bool AllowMultiDrag { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | A boolean value indicating whether dragging multiple appointments is allowed. The default value is |
Remarks
This property is applicable only when AllowDragAndDrop property is enabled.
AllowMultiRowSelection
Gets or sets the ability to select multiple days (rows) in the scheduler.
Declaration
public bool AllowMultiRowSelection { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | A boolean value indicating whether multiple day selection is allowed. The default value is |
AllowResizing
Gets or sets the ability to resize appointments in the scheduler.
Declaration
public bool AllowResizing { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | A boolean value indicating whether appointment resizing is allowed. The default value is |
Remarks
When set to true
, this property allows the rescheduling of appointments by changing their start or end time by dragging the event resize handles.
ChildContent
Gets or sets the child content of schedule component.
Declaration
public RenderFragment ChildContent { get; set; }
Property Value
Type |
---|
Microsoft.AspNetCore.Components.RenderFragment |
CssClass
Gets or sets the custom classes to customize the schedule component.
Declaration
public string CssClass { get; set; }
Property Value
Type | Description |
---|---|
System.String | If we set the css class, then the custom class is applied for schedule element. The default value is |
Examples
<SfSchedule CssClass="custom-tab"></SfSchedule>
CurrentView
Gets or sets the current view on the scheduler. The specified view will be initially loaded.
Declaration
public View CurrentView { get; set; }
Property Value
Type | Description |
---|---|
View | One of the View enumeration |
Remarks
Depending on the value of View
, the following views will be rendered:
CurrentViewChanged
Invokes when current view changes.
Declaration
public EventCallback<View> CurrentViewChanged { get; set; }
Property Value
Type |
---|
Microsoft.AspNetCore.Components.EventCallback<View> |
DateFormat
Gets or sets the date format that should be applied on header date range label and also in editor window.
Declaration
public string DateFormat { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts a string value to set specific date format. By default |
EnableAdaptiveUI
Gets or sets the ability to enable compact view and header view navigation in a popup.
Declaration
public bool EnableAdaptiveUI { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | A boolean value indicating whether the compact view and header view navigation are enabled in a popup. The default value is |
Remarks
When this property is set to true
, the header view navigations will be listed in a popup and the compact view will be enabled if resource grouping is also enabled.
EnableAllDayScroll
Gets or sets the ability to enable scrolling on the all day row when it reaches maximum height when expanded.
Declaration
public bool EnableAllDayScroll { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | A boolean value indicating whether scrolling on the all day row is enabled. The default value is |
EnableAutoRowHeight
Gets or sets the ability to adjust the height of work cells based on the number of appointments in the time range.
Declaration
public bool EnableAutoRowHeight { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | A boolean value indicating whether the height of work cells is adjusted automatically. The default value is |
Remarks
This property is applicable for Month and Timeline views.
EnablePersistence
Gets or sets whether to persist component's state between page reloads. When set to true
, the CurrentView and SelectedDate property is persisted.
Declaration
public bool EnablePersistence { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Remarks
Component's CurrentView and SelectedDate property will be stored in browser local storage to persist component's state when page reloads. It is mandatory to provide ID to persist these properties.
EnableRecurrenceValidation
Gets or sets the ability to perform recurrence validation.
Declaration
public bool EnableRecurrenceValidation { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | A boolean value indicating whether recurrence validation is performed. The default value is |
Remarks
When this property is set to false
, recurrence validation will be skipped.
EnableRtl
Gets or sets whether the right to left direction is enabled for schedule component.
Declaration
public bool EnableRtl { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true, the right to left direction is enabled for schedule component. The default value is |
EndHour
Gets or sets the time string in short skeleton format HH:mm
, which represents the end of the schedule hour.
Declaration
public string EndHour { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string value representing the time. The default value is |
Remarks
The time beyond the specified end time is hidden when this property is used.
EventDragArea
Gets or sets the ability to enable external drag and drop support for appointments on the scheduler.
Declaration
public string EventDragArea { get; set; }
Property Value
Type | Description |
---|---|
System.String | A boolean value indicating whether external drag and drop is enabled. The default value is |
Remarks
When this property is set to true
, appointments can be dragged out of the scheduler layout.
If the drag area is explicitly set to a specific DOM element name, appointments can be dragged within the specified drag area location.
This property is applicable only when AllowDragAndDrop property is enabled.
FirstDayOfWeek
Gets or sets the first day of the week.
Declaration
public int FirstDayOfWeek { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | An integer value representing the first day of the week., By default |
FirstMonthOfYear
Gets or sets the first month of the year.
Declaration
public int FirstMonthOfYear { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | An integer value representing the month. The default value is |
Remarks
The value 1
denotes January, 2
denotes February and so on.
Height
Gets or sets the height of the schedule element in pixels/number/percentage.
Declaration
public string Height { get; set; }
Property Value
Type | Description |
---|---|
System.String | If we set the height value, then the schedule will render based on specified height otherwise the default height value |
Remarks
If we set number values, then it is considered as pixels.
Examples
<SfSchedule Height="500px"></SfSchedule>
HideEmptyAgendaDays
Gets or sets the ability to hide empty dates from the Agenda View of the scheduler.
Declaration
public bool HideEmptyAgendaDays { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | A boolean value indicating whether empty dates are hidden in Agenda View. The default value is |
Remarks
When this property is set to false
, empty dates will also be displayed on the scheduler.
ID
Gets or sets the unique Id value for schedule component.
Declaration
public string ID { get; set; }
Property Value
Type | Description |
---|---|
System.String | If we set the id, then the id value set for schedule element. The default value is |
MaxDate
Gets or sets the maximum date that can be displayed on the scheduler.
Declaration
public DateTime MaxDate { get; set; }
Property Value
Type | Description |
---|---|
System.DateTime | A date value. The default value is |
Remarks
The appointments after the MaxDate
range will be hide form the UI.
We cannot navigate to a date beyond the MaxDate
.
MinDate
Gets or sets the minimum date that can be displayed on the scheduler.
Declaration
public DateTime MinDate { get; set; }
Property Value
Type | Description |
---|---|
System.DateTime | A date value. The default value is |
Remarks
The appointments before the MinDate
range will be hide form the UI.
We cannot navigate to a date before the MinDate
.
MonthsCount
Gets or sets the number of months to be displayed on the scheduler.
Declaration
public int MonthsCount { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | An integer value indicating the number of months. The default value is |
Remarks
This property is applicable only in Year and TimelineYear views.
QuickInfoOnSelectionEnd
Gets or sets the ability to show a quick popup after multiple cell selection via mouse interaction.
Declaration
public bool QuickInfoOnSelectionEnd { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | A boolean value indicating whether the quick popup is shown after multiple cell selection. The default value is |
Remarks
This property is applicable only when ShowQuickInfo property is enabled.
Readonly
Gets or sets the ability to enable read-only mode on the scheduler.
Declaration
public bool Readonly { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | A boolean value indicating whether the scheduler is in read-only mode. The default value is |
Remarks
When this property is set to true
, the scheduler will not allow any CRUD (create, read, update, delete) actions.
SelectedDate
Gets or sets the currently selected date on the scheduler, based on which layout will be rendered.
Declaration
public DateTime SelectedDate { get; set; }
Property Value
Type | Description |
---|---|
System.DateTime | A System.DateTime value. The default value is the current system date. |
Remarks
If the SelectedDate
value is set before the MinDate, the MinDate
value will be applied to SelectedDate
.
If the SelectedDate
value is set beyond the MaxDate, the MaxDate
value will be applied to SelectedDate
.
SelectedDateChanged
Invokes when selected date changes.
Declaration
public EventCallback<DateTime> SelectedDateChanged { get; set; }
Property Value
Type |
---|
Microsoft.AspNetCore.Components.EventCallback<System.DateTime> |
ShowHeaderBar
Gets or sets the ability to hide the header bar on the scheduler.
Declaration
public bool ShowHeaderBar { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | A boolean value indicating whether the header bar is hidden. The default value is |
Remarks
The header bar holds the date and view navigation options.
ShowQuickInfo
Gets or sets the ability to display a quick popup with cell or event details on single click.
Declaration
public bool ShowQuickInfo { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | A boolean value indicating whether the quick popup is displayed on single click. The default value is |
ShowTimeIndicator
Gets or sets the ability to hide the current time indicator on the scheduler.
Declaration
public bool ShowTimeIndicator { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | A boolean value indicating whether the current time indicator is hidden. The default value is |
Remarks
When this property is set to true
, the current time indicator will be hidden from the user interface. Otherwise, it will visually depict the current system time.
ShowWeekend
Gets or sets whether non-working days are hidden from the scheduler.
Declaration
public bool ShowWeekend { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | If set to |
Remarks
Days that are not defined in the WorkDays property are typically treated as weekend days.
This property has no effect on the WorkWeek, Year and TimelineYear views.
For example, if the working days are defined as new int[] { 1, 3, 5 }
, the remaining days of that week will be considered as weekend days and will not be rendered if this property is set to false
.
ShowWeekNumber
Gets or sets the ability to display the week number of the current view date range on the scheduler.
Declaration
public bool ShowWeekNumber { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | A boolean value indicating whether the week number is displayed. The default value is |
Remarks
This property has an effect on Day, Week, WorkWeek, Month and Year views of scheduler.
StartHour
Gets or sets the time string in short skeleton format HH:mm
, which represents the start of the schedule hour.
Declaration
public string StartHour { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string value representing the time. The default value is |
Remarks
The time before the specified start time is hidden when this property is used.
TimeFormat
Gets or sets the time format that should be applied on schedule time slots and also in editor window.
Declaration
public string TimeFormat { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts a string value to set specific time format. By default |
Timezone
Gets or sets the timezone to be applied on the scheduler.
Declaration
public string Timezone { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string value representing a valid IANA timezone name. The default value is the system timezone. |
Remarks
It is recommended to set a specific timezone on the scheduler when it is bound to remote data services to display events consistently across different timezones.
TimezoneDataSource
Gets or sets the timezone data source settings for the scheduler.
Declaration
public List<TimezoneFields> TimezoneDataSource { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<TimezoneFields> | Accepts a collection of TimezoneFields. |
Remarks
The TimezoneDataSource
collection will be displayed in editor window timezone.
WeekRule
Gets or sets the week rule to be applied on the scheduler.
Declaration
public CalendarWeekRule WeekRule { get; set; }
Property Value
Type | Description |
---|---|
System.Globalization.CalendarWeekRule | One of the System.Globalization.CalendarWeekRule enumeration values. The default value is System.Globalization.CalendarWeekRule.FirstDay. |
Remarks
The available values for the week rule are:
FirstDay
: The week starts on the first day of the month.FirstFullWeek
: The week starts on the first full week of the month.FirstFourDayWeek
: The week starts on the first four-day week of the month.
Width
Gets or sets the width of the schedule element in pixels/number/percentage.
Declaration
public string Width { get; set; }
Property Value
Type | Description |
---|---|
System.String | If we set the width value, then the schedule will render based on specified width otherwise the default width value |
Remarks
If we set number values, then it is considered as pixels.
Examples
<SfSchedule Width="500px"></SfSchedule>
WorkDays
Gets or sets the working days on the schedule.
Declaration
public int[] WorkDays { get; set; }
Property Value
Type | Description |
---|---|
System.Int32[] | An array of integer values based on the System.DayOfWeek enumeration. |
Remarks
The defined days in the collection will be rendered in the WorkWeek
view. In other views, all usual days will be displayed, and working days will be highlighted with a different shade.
Examples
In below code example Monday, Wednesday and Friday were set as workdays for week view.
<SfSchedule TValue="AppointmentData" WorkDays="new int[] { 1, 3, 5 }"></SfSchedule>
Methods
AddEventAsync(TValue)
Adds the newly created event into the Scheduler dataSource.
Declaration
public Task AddEventAsync(TValue data)
Parameters
Type | Name | Description |
---|---|---|
TValue | data | New event to be added. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | System.Threading.Tasks.Task. |
AddEventAsync(List<TValue>)
Adds the newly created events into the Scheduler dataSource.
Declaration
public Task AddEventAsync(List<TValue> data)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<TValue> | data | New events to be added. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | System.Threading.Tasks.Task. |
AddResource<T>(List<T>, String, Int32)
Adds the resources to the specified index.
Declaration
public void AddResource<T>(List<T> resources, string name, int index)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<T> | resources | Specifies the resource collection(s) to be added. |
System.String | name | Specifies the resource name to which the provided resource(s) will add. |
System.Int32 | index | Specifies th index where it should be added. |
Type Parameters
Name | Description |
---|---|
T | Specifies the type of resource collection in which resources to be added. |
AddResourceCollection(IScheduleResources)
Called internally to update the resource collections.
Declaration
public Task AddResourceCollection(IScheduleResources resource)
Parameters
Type | Name | Description |
---|---|---|
IScheduleResources | resource | Resource data. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | Task. |
BuildRenderTree(RenderTreeBuilder)
Declaration
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder | __builder |
ChangeCurrentViewAsync(View, Nullable<Int32>)
Allows to change the current view of the scheduler dynamically.
Declaration
public Task ChangeCurrentViewAsync(View viewName, Nullable<int> viewIndex = null)
Parameters
Type | Name | Description |
---|---|---|
View | viewName | Specifies the view name. |
System.Nullable<System.Int32> | viewIndex | Specifies the index of the view. The default value is |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | System.Threading.Tasks.Task. |
ChangeDateAsync(DateTime)
Allows to navigate the scheduler to the specified date.
Declaration
public Task ChangeDateAsync(DateTime date)
Parameters
Type | Name | Description |
---|---|---|
System.DateTime | date | Specifies the date to be navigated. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | System.Threading.Tasks.Task. |
CloseEditor()
Closes the event editor window manually.
Declaration
public void CloseEditor()
CloseQuickInfoPopupAsync()
Closes the quick info popup manually.
Declaration
public Task CloseQuickInfoPopupAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | System.Threading.Tasks.Task. |
CloseTooltipAsync()
Closes the tooltip asynchronously.
Declaration
public void CloseTooltipAsync()
Remarks
This method can be used to close the tooltip, for example when the context menu is opened for an event.
CollapseResourceAsync<T>(T, String)
Collapses the specified resource on the scheduler.
Declaration
public Task CollapseResourceAsync<T>(T resourceId, string name)
Parameters
Type | Name | Description |
---|---|---|
T | resourceId | Specifies the resource id to be collapsed. |
System.String | name | Specifies the resource name to be collapsed. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | System.Threading.Tasks.Task. |
Type Parameters
Name | Description |
---|---|
T | Specifies the type of the resource id to be collapsed. |
DeleteEventAsync(TValue, Nullable<CurrentAction>)
Deletes the events from the Scheduler based on the event collection.
Declaration
public Task DeleteEventAsync(TValue eventData, Nullable<CurrentAction> currentAction = null)
Parameters
Type | Name | Description |
---|---|---|
TValue | eventData | Accepts the entire event collection to be deleted. |
System.Nullable<CurrentAction> | currentAction | The current action of the scheduler to take place. The default value is |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | System.Threading.Tasks.Task. |
DeleteEventAsync<T>(T, Nullable<CurrentAction>)
Deletes the events from the Scheduler based on the provided ID of an event.
Declaration
public Task DeleteEventAsync<T>(T id, Nullable<CurrentAction> currentAction = null)
Parameters
Type | Name | Description |
---|---|---|
T | id | Accepts the id of the event to be deleted. |
System.Nullable<CurrentAction> | currentAction | Specifies the current action of the scheduler to take place. The default value is |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | System.Threading.Tasks.Task. |
Type Parameters
Name | Description |
---|---|
T | Specifies the type of the event ID to be deleted. |
ExpandResourceAsync<T>(T, String)
Expands the specified resource on the scheduler.
Declaration
public Task ExpandResourceAsync<T>(T resourceId, string name)
Parameters
Type | Name | Description |
---|---|---|
T | resourceId | Specifies the resource id to be expanded. |
System.String | name | Specifies the resource name to be expanded. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | System.Threading.Tasks.Task. |
Type Parameters
Name | Description |
---|---|
T | Specifies the type of the resource id to be expanded. |
ExportToExcelAsync(ExportOptions)
Exports the Scheduler events data as an Excel file in .xlsx or .csv file formats.
Declaration
public Task ExportToExcelAsync(ExportOptions excelExportOptions = null)
Parameters
Type | Name | Description |
---|---|---|
ExportOptions | excelExportOptions | Specifies the export options to export the event collection. The default value is |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | System.Threading.Tasks.Task. |
ExportToICalendarAsync(String, List<TValue>)
Exports the Scheduler events to a calendar (.ics) file. By default, the calendar is exported with a file name Calendar.ics
.
Declaration
public Task ExportToICalendarAsync(string fileName = null, List<TValue> customData = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | fileName | Specifies the file name to be used on export. The default value is "Calendar.ics". |
System.Collections.Generic.List<TValue> | customData | Specifies the custom required events to be exported. The default value is |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | System.Threading.Tasks.Task. |
GetBlockEventsAsync(Nullable<DateTime>, Nullable<DateTime>, Nullable<Boolean>)
Retrieves the block event collection bound to the Scheduler.
Declaration
public Task<List<TValue>> GetBlockEventsAsync(Nullable<DateTime> startDate = null, Nullable<DateTime> endDate = null, Nullable<bool> includeOccurrences = null)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<System.DateTime> | startDate | Specifies the start date of a range. The default value is null. |
System.Nullable<System.DateTime> | endDate | Specifies the end date of a range. The default value is null. |
System.Nullable<System.Boolean> | includeOccurrences | Specifies whether to include occurrence events. The default value is null. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.List<TValue>> | System.Collections.Generic.List<>. A list of block events. |
GetCurrentAction()
Gets the current action of the scheduler.
Declaration
public CurrentAction GetCurrentAction()
Returns
Type | Description |
---|---|
CurrentAction | The CurrentAction of the scheduler. |
GetCurrentViewDates()
Retrieves the dates that lie on the active view of the Scheduler.
Declaration
public List<DateTime> GetCurrentViewDates()
Returns
Type | Description |
---|---|
System.Collections.Generic.List<System.DateTime> | System.Collections.Generic.List<>. A list of dates. |
GetCurrentViewEvents()
Retrieves the events that lie on the current date range of the active view of the Scheduler.
Declaration
public List<TValue> GetCurrentViewEvents()
Returns
Type | Description |
---|---|
System.Collections.Generic.List<TValue> | The current view events as a list of objects of type |
GetDeletedOccurrences<T>(T)
Gets the deleted occurrences from a given recurrence series.
Declaration
public List<TValue> GetDeletedOccurrences<T>(T recurrenceData)
Parameters
Type | Name | Description |
---|---|---|
T | recurrenceData | Specifies the series of the recurrence appointment. |
Returns
Type | Description |
---|---|
System.Collections.Generic.List<TValue> | A list of objects of type |
Type Parameters
Name | Description |
---|---|
T | Specifies the type of scheduler appointments. |
GetElementInfoAsync(Int32, Int32)
Retrieves the information of the target element.
Declaration
public Task<ElementInfo<TValue>> GetElementInfoAsync(int left, int top)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | left | The x coordinate of the target element. |
System.Int32 | top | The y coordinate of the target element. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<ElementInfo<TValue>> | An object of type ElementInfo<T> containing the details of the targeted element. |
GetEventsAsync(Nullable<DateTime>, Nullable<DateTime>, Nullable<Boolean>)
Retrieves the entire collection of events bound to the Scheduler asynchronously.
Declaration
public Task<List<TValue>> GetEventsAsync(Nullable<DateTime> startDate = null, Nullable<DateTime> endDate = null, Nullable<bool> includeOccurrences = null)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<System.DateTime> | startDate | Specifies the start date of the range. The default value is |
System.Nullable<System.DateTime> | endDate | Specifies the end date of the range. The default value is |
System.Nullable<System.Boolean> | includeOccurrences | Specifies whether to include occurrence events. The default value is |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.List<TValue>> | A list of objects of type |
GetGroupIndex<T>(T, String)
Gets the group index of a resource in the resource collection.
Declaration
public int GetGroupIndex<T>(T resourceId, string groupName = null)
Parameters
Type | Name | Description |
---|---|---|
T | resourceId | The ID of the resource to get the group index. |
System.String | groupName | The name of the resource group, if applicable. |
Returns
Type | Description |
---|---|
System.Int32 | The group index of the resource. |
Type Parameters
Name | Description |
---|---|
T | The type of the resource ID. |
GetMaxEventIdAsync<T>()
Retrieves the maximum id of the scheduler events asynchronously.
Declaration
public Task<T> GetMaxEventIdAsync<T>()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<T> | The maximum id of the scheduler events as an object of type T. |
Type Parameters
Name | Description |
---|---|
T | Specifies the type of id in the scheduler events. |
GetOccurrencesByID<T>(T)
Retrieves the occurrences of a single recurrence event based on the provided parent ID.
Declaration
public List<TValue> GetOccurrencesByID<T>(T eventID)
Parameters
Type | Name | Description |
---|---|---|
T | eventID | Specifies the id of the event as an object of type T. |
Returns
Type | Description |
---|---|
System.Collections.Generic.List<TValue> | A list of objects of type |
Type Parameters
Name | Description |
---|---|
T | Specifies the type of the event id. |
GetOccurrencesByRange(DateTime, DateTime)
Retrieves all the occurrences that lies between the specific start and end time range.
Declaration
public List<TValue> GetOccurrencesByRange(DateTime startTime, DateTime endTime)
Parameters
Type | Name | Description |
---|---|---|
System.DateTime | startTime | Specifies the start date of a range. |
System.DateTime | endTime | Specifies the end date of a range. |
Returns
Type | Description |
---|---|
System.Collections.Generic.List<TValue> | A list of objects of type |
GetResourceByIndex(Int32)
Retrieves the resource details based on the provided resource index.
Declaration
public ResourceDetails<TValue> GetResourceByIndex(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The index of the resource at the last level. |
Returns
Type | Description |
---|---|
ResourceDetails<TValue> | An object of type ResourceDetails<T> holding the details of the resource and resource data. |
GetResourceCollections()
Retrieves the resource collection available in the scheduler.
Declaration
public List<Resource> GetResourceCollections()
Returns
Type | Description |
---|---|
System.Collections.Generic.List<Resource> | A list of objects of type Resource representing the resource collections available in the scheduler. |
GetSelectedCellsAsync()
Retrieves the selected cell details.
Declaration
public Task<CellClickEventArgs> GetSelectedCellsAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<CellClickEventArgs> | An object of type CellClickEventArgs holding the details of the selected cells. |
GetSelectedEventsAsync()
Retrieves the selected event details.
Declaration
public Task<List<TValue>> GetSelectedEventsAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.List<TValue>> | A list of objects of type |
GetTargetCellAsync(Int32, Int32)
Retrieves the information of the target cell.
Declaration
public Task<CellClickEventArgs> GetTargetCellAsync(int left, int top)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | left | The x coordinate of the target cell. |
System.Int32 | top | The y coordinate of the target cell. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<CellClickEventArgs> | An object of type CellClickEventArgs containing the details of the targeted cell. |
GetTargetEventAsync(Int32, Int32)
Retrieves the details of the event that is targeted by the provided coordinates.
Declaration
public Task<TValue> GetTargetEventAsync(int left, int top)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | left | The x coordinate of the target event. |
System.Int32 | top | The y coordinate of the target event. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<TValue> | A task representing the asynchronous operation. The task result contains the details of the targeted event of type |
HideSpinnerAsync()
Hides the spinner if it is currently being displayed.
Declaration
public Task HideSpinnerAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | System.Threading.Tasks.Task. |
ImportICalendarAsync(String)
Imports events from an .ics file into the Scheduler.
Declaration
public Task ImportICalendarAsync(string fileContent)
Parameters
Type | Name | Description |
---|---|---|
System.String | fileContent | The contents of the .ics file in string format. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | System.Threading.Tasks.Task. |
IsSlotAvailableAsync(TValue)
Determines whether the time range of the specified event is available for event creation or is already occupied by other events.
Declaration
public Task<bool> IsSlotAvailableAsync(TValue eventData)
Parameters
Type | Name | Description |
---|---|---|
TValue | eventData | The event data to check for availability. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Boolean> | A task representing the asynchronous operation. The task result is |
IsSlotAvailableAsync(DateTime, Nullable<DateTime>, Nullable<Int32>)
Determines whether the specified time range is available for event creation or is already occupied by other events.
Declaration
public Task<bool> IsSlotAvailableAsync(DateTime startTime, Nullable<DateTime> endTime = null, Nullable<int> groupIndex = null)
Parameters
Type | Name | Description |
---|---|---|
System.DateTime | startTime | The start time of the time range to check for availability. |
System.Nullable<System.DateTime> | endTime | The end time of the time range to check for availability. The default value is |
System.Nullable<System.Int32> | groupIndex | The resource index of the last level to consider when checking for availability. The default value is |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Boolean> | A task representing the asynchronous operation. The task result is |
OnAfterRenderAsync(Boolean)
Declaration
protected override Task OnAfterRenderAsync(bool firstRender)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | firstRender |
Returns
Type |
---|
System.Threading.Tasks.Task |
Overrides
OnInitializedAsync()
Declaration
protected override Task OnInitializedAsync()
Returns
Type |
---|
System.Threading.Tasks.Task |
Overrides
OnParametersSetAsync()
Declaration
protected override Task OnParametersSetAsync()
Returns
Type |
---|
System.Threading.Tasks.Task |
OpenEditorAsync(TValue, CurrentAction)
Manually opens the event editor for a specific event.
Declaration
public Task OpenEditorAsync(TValue data, CurrentAction action)
Parameters
Type | Name | Description |
---|---|---|
TValue | data | The event data for which to open the editor. |
CurrentAction | action | The current action of the scheduler. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | System.Threading.Tasks.Task. |
OpenEditorAsync(CellClickEventArgs, CurrentAction, Nullable<RepeatType>)
Manually opens the editor window for a specific time.
Declaration
public Task OpenEditorAsync(CellClickEventArgs data, CurrentAction action, Nullable<RepeatType> repeatType = null)
Parameters
Type | Name | Description |
---|---|---|
CellClickEventArgs | data | The cell details for which to open the editor. |
CurrentAction | action | The current action of the scheduler. |
System.Nullable<RepeatType> | repeatType | Indicates the type of recurrence to open the editor with. If not provided, the editor will not have a recurrence option. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | System.Threading.Tasks.Task. |
OpenQuickInfoPopupAsync(TValue)
Asynchronously opens the quick info popup based on event details.
Declaration
public Task OpenQuickInfoPopupAsync(TValue data)
Parameters
Type | Name | Description |
---|---|---|
TValue | data | The event details for which to open the quick info popup. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | System.Threading.Tasks.Task. |
OpenQuickInfoPopupAsync(CellClickEventArgs)
Asynchronously opens the quick info popup based on cell details.
Declaration
public Task OpenQuickInfoPopupAsync(CellClickEventArgs data)
Parameters
Type | Name | Description |
---|---|---|
CellClickEventArgs | data | The cell details for which to open the quick info popup. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | System.Threading.Tasks.Task. |
PreventRender(Boolean)
Prevents the Scheduler render. This method will internally sets value to be returned from ShouldRender method.
Declaration
public void PreventRender(bool preventRender = true)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | preventRender | Default value is true. Toggles the ShouldRender method value. |
PrintAsync()
Prints the current view of the scheduler.
Declaration
public Task PrintAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | System.Threading.Tasks.Task. |
PrintAsync(PrintOptions)
Prints the current view of the scheduler with the specified width and height.
Declaration
public Task PrintAsync(PrintOptions options)
Parameters
Type | Name | Description |
---|---|---|
PrintOptions | options | The print options, including the width and height of the printed scheduler. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | System.Threading.Tasks.Task. |
RefreshAsync(Boolean)
Re-renders the layouts that are currently visible in the scheduler.
Declaration
public Task RefreshAsync(bool isRefreshEvents = true)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | isRefreshEvents | Specifies whether to refresh the scheduler events. The default value is true. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | System.Threading.Tasks.Task. |
Remarks
This method refreshes the layout of the scheduler by re-rendering the currently visible layouts. It ensures that the event collection used by the scheduler remains unchanged and maintains the latest data without refreshing it.
RefreshEventsAsync()
Refreshes the event data source and re-renders the events in the scheduler.
Declaration
public Task RefreshEventsAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | System.Threading.Tasks.Task. |
RemoveResource<T>(List<T>, String)
Removes the specified resources from the scheduler.
Declaration
public void RemoveResource<T>(List<T> resourceIDList, string name)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<T> | resourceIDList | A list of resource IDs to remove. |
System.String | name | The name of the resources to remove. |
Type Parameters
Name | Description |
---|---|
T | The type of resource ID. |
ResetWorkHoursAsync(List<DateTime>, String, String, Nullable<Int32>)
Removes or resets working hours on specific dates or for a specific resource.
Declaration
public Task ResetWorkHoursAsync(List<DateTime> dates, string start = null, string end = null, Nullable<int> groupIndex = null)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<System.DateTime> | dates | The dates for which to reset the working hours. |
System.String | start | The start of the work hour to be removed. The default value is |
System.String | end | The end of the work hour to be removed. The default value is |
System.Nullable<System.Int32> | groupIndex | The index of the resource for which to reset the working hours. The default value is |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | System.Threading.Tasks.Task. |
SaveEventAsync(TValue, CurrentAction, TValue)
Saves changes to an event object by updating the data source.
Declaration
public Task SaveEventAsync(TValue data, CurrentAction currentAction, TValue editingData)
Parameters
Type | Name | Description |
---|---|---|
TValue | data | The edited event to save. |
CurrentAction | currentAction | The current action whether the edited event should reflect single occurrence or entire series. |
TValue | editingData | The original event before editing. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | System.Threading.Tasks.Task. |
SaveEventAsync(TValue, Nullable<CurrentAction>)
Saves changes to an event object by updating the data source.
Declaration
public Task SaveEventAsync(TValue data, Nullable<CurrentAction> currentAction = null)
Parameters
Type | Name | Description |
---|---|---|
TValue | data | The edited event to save. |
System.Nullable<CurrentAction> | currentAction | The current action of the scheduler to take place. The default value is |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | System.Threading.Tasks.Task. |
SaveEventAsync(List<TValue>, Nullable<CurrentAction>)
Saves changes to a list of event objects by updating the data source.
Declaration
public Task SaveEventAsync(List<TValue> data, Nullable<CurrentAction> currentAction = null)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<TValue> | data | The edited events to save. |
System.Nullable<CurrentAction> | currentAction | The current action of the scheduler to take place. The default value is |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | System.Threading.Tasks.Task. |
ScrollToAsync(String, Nullable<DateTime>)
Scrolls the Scheduler content area to the specified time.
Declaration
public Task ScrollToAsync(string hour, Nullable<DateTime> scrollDate = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | hour | The time to scroll in |
System.Nullable<System.DateTime> | scrollDate | Specifies the date where to be scrolled. The default value is |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | System.Threading.Tasks.Task. |
ScrollToResourceAsync<T>(T, String)
Asynchronously scrolls to the position of a resource on the scheduler.
Declaration
public Task ScrollToResourceAsync<T>(T resourceId, string groupName = null)
Parameters
Type | Name | Description |
---|---|---|
T | resourceId | The ID of the resource to scroll to. |
System.String | groupName | The name of the resource group, if applicable. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | System.Threading.Tasks.Task. |
Type Parameters
Name | Description |
---|---|
T | The type of the resource ID. |
Remarks
This method is not applicable for Agenda and Month agenda views of the scheduler.
SetWorkHoursAsync(List<DateTime>, String, String, Nullable<Int32>)
Asynchronously sets the working hours for a specified collection of dates.
Declaration
public Task SetWorkHoursAsync(List<DateTime> dates, string start, string end, Nullable<int> groupIndex = null)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<System.DateTime> | dates | The collection of working dates for which to set the working hours. |
System.String | start | The start time of the working hours. |
System.String | end | The end time of the working hours. |
System.Nullable<System.Int32> | groupIndex | The index of the group to set the working hours for, if applicable. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | System.Threading.Tasks.Task. |
ShouldRender()
Declaration
protected override bool ShouldRender()
Returns
Type |
---|
System.Boolean |
ShowSpinnerAsync()
Asynchronously shows the spinner on the scheduler.
Declaration
public Task ShowSpinnerAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | System.Threading.Tasks.Task. |