Class ScheduleEventSettings<TValue>
A class that represents event settings for configuring the scheduler events.
Implements
Inherited Members
Namespace: Syncfusion.Blazor.Schedule
Assembly: Syncfusion.Blazor.dll
Syntax
public class ScheduleEventSettings<TValue> : SfDataBoundComponent, 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
public bool AllowAdding { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
|
AllowDeleting
Gets or sets a value indicating whether events can be deleted from the Scheduler.
Declaration
public bool AllowDeleting { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
|
AllowEditFollowingEvents
Gets or sets a value indicating whether only future events in a series can be edited.
Declaration
public bool AllowEditFollowingEvents { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
|
AllowEditing
Gets or sets a value indicating whether events can be edited in the Scheduler.
Declaration
public bool AllowEditing { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
|
ChildContent
Gets or sets the child content for schedule event settings.
Declaration
public RenderFragment ChildContent { get; set; }
Property Value
| Type | Description |
|---|---|
| Microsoft.AspNetCore.Components.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
public IEnumerable<TValue> DataSource { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<TValue> | The collection should be of type System.Collections.Generic.IEnumerable<>. |
EnableIndicator
Gets or sets whether events can occupy the full height of the cell, excluding the header and more indicator.
Declaration
public bool EnableIndicator { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
|
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
public bool EnableMaxHeight { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
|
EnableTooltip
Gets or sets whether a tooltip is displayed for events, showing the subject, location, start and end time.
Declaration
public bool EnableTooltip { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
|
IgnoreWhitespace
Gets or sets whether the bottom white space of the Events element should be ignored or included.
Declaration
public bool IgnoreWhitespace { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
|
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
public bool IncludeFiltersInQuery { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean | Set to |
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
public int MinimumEventDuration { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int32 | 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
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
public string ResourceColorField { get; set; }
Property Value
| Type | Description |
|---|---|
| System.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
public string SortBy { get; set; }
Property Value
| Type | Description |
|---|---|
| System.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
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 Microsoft.AspNetCore.Components.RenderFragment that defines custom appearance for displaying scheduler events.
Declaration
public RenderFragment<object> Template { get; set; }
Property Value
| Type | Description |
|---|---|
| Microsoft.AspNetCore.Components.RenderFragment<System.Object> | A template content that specifies the visualization of a scheduler event. The default value is |
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 Microsoft.AspNetCore.Components.RenderFragment that defines custom appearance for displaying event tooltip.
Declaration
public RenderFragment<object> TooltipTemplate { get; set; }
Property Value
| Type | Description |
|---|---|
| Microsoft.AspNetCore.Components.RenderFragment<System.Object> | A template content that specifies the visualization of event tooltip. The default value is |
Examples
<SfSchedule TValue="AppointmentData">
<ScheduleEventSettings TValue="AppointmentData" DataSource="@DataSource">
<TooltipTemplate>
<div class="tooltip-wrap">
<div>@((context as AppointmentData).Subject)</div>
<div>From : @((context as AppointmentData).StartTime)</div>
<div>To : @((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 |
|---|---|---|
| Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder | __builder |
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 |