SchedulerViewBase Class

A base class for RadzenScheduler<T> views.

Implements

IComponent

IHandleEvent

IHandleAfterRender

ISchedulerView

Inherited Members

ComponentBase.BuildRenderTree

ComponentBase.OnInitialized

ComponentBase.OnInitializedAsync

ComponentBase.OnParametersSet

ComponentBase.OnParametersSetAsync

ComponentBase.StateHasChanged

ComponentBase.ShouldRender

ComponentBase.OnAfterRender

ComponentBase.OnAfterRenderAsync

ComponentBase.InvokeAsync

ComponentBase.DispatchExceptionAsync

ComponentBase.RendererInfo

ComponentBase.Assets

ComponentBase.AssignedRenderMode

Namespace: Radzen.Blazor

Assembly: Radzen.Blazor.dll

Syntax

public abstract class SchedulerViewBase : ComponentBase, IComponent, IHandleEvent, IHandleAfterRender, ISchedulerView

Constructors

SchedulerViewBaseLink to this section

A base class for RadzenScheduler<T> views.

Declaration
protected SchedulerViewBase()

Properties

EndDateLink to this section

Gets the end date.

Declaration
public DateTime EndDate { get; }
Property Value
Type Description
DateTimeGets the end date.

GroupByLink to this section

Gets or sets a comma-separated list of resource type names (Name) to group by, in nesting order. All declared resource types in order of declaration are used when not set.

Declaration
public string GroupBy { get; set; }
Property Value
Type Description
stringGets or sets a comma-separated list of resource type names (Name) to group by, in nesting order. All declared resource types in order of declaration are used when not set.

GroupByResourceLink to this section

Gets or sets a value indicating whether the view groups appointments by the resource types of the scheduler (declared as RadzenSchedulerResource child content). Set to false by default.

Declaration
public bool GroupByResource { get; set; }
Property Value
Type Description
boolGets or sets a value indicating whether the view groups appointments by the resource types of the scheduler (declared as RadzenSchedulerResource child content). Set to false by default.

GroupOrientationLink to this section

Gets or sets the orientation of the resource groups. Horizontal renders the groups side by side, vertical renders them one below the other. Set to Vertical by default. The day view uses Horizontal by default and renders the resources as columns which share the time ruler.

Declaration
public Orientation GroupOrientation { get; set; }
Property Value
Type Description
OrientationGets or sets the orientation of the resource groups. Horizontal renders the groups side by side, vertical renders them one below the other. Set to Vertical by default. The day view uses Horizontal by default and renders the resources as columns which share the time ruler.

HasResourceGroupsLink to this section

Gets a value indicating whether the view should render resource groups - GroupByResource is set and the scheduler has resources with items.

Declaration
protected bool HasResourceGroups { get; }
Property Value
Type Description
boolGets a value indicating whether the view should render resource groups - GroupByResource is set and the scheduler has resources with items.

IconLink to this section

Gets the icon of the view. It is displayed in the view switching UI.

Declaration
public string Icon { get; }
Property Value
Type Description
stringGets the icon of the view. It is displayed in the view switching UI.

ResourcePathsLink to this section

Gets every combination of resource items the view groups by - the cartesian product of the items of ResourceTypes, each keyed by resource type Name.

Declaration
protected IList<IDictionary<string, object>> ResourcePaths { get; }
Property Value
Type Description
IList<IDictionary<string, object>>Gets every combination of resource items the view groups by - the cartesian product of the items of ResourceTypes, each keyed by resource type Name.

ResourceTypesLink to this section

Gets the resource types the view groups by - the declared resource types filtered and ordered by GroupBy.

Declaration
protected IList<RadzenSchedulerResource> ResourceTypes { get; }
Property Value
Type Description
IList<RadzenSchedulerResource>Gets the resource types the view groups by - the declared resource types filtered and ordered by GroupBy.

SchedulerLink to this section

Gets or sets the scheduler instance.

Declaration
public IScheduler Scheduler { get; set; }
Property Value
Type Description
ISchedulerGets or sets the scheduler instance.

StartDateLink to this section

Gets the start date.

Declaration
public DateTime StartDate { get; }
Property Value
Type Description
DateTimeGets the start date.

TextLink to this section

Gets the text of the view. It is displayed in the view switching UI.

Declaration
public string Text { get; set; }
Property Value
Type Description
stringGets the text of the view. It is displayed in the view switching UI.

TitleLink to this section

Gets the title of the view. It is displayed in the RadzenScheduler title area.

Declaration
public string Title { get; }
Property Value
Type Description
stringGets the title of the view. It is displayed in the RadzenScheduler title area.

TitleFormatLink to this section

Gets or sets a composite format string used to format the view title. Argument {0} is the first date and argument {1} is the last date displayed by the view. The dates are formatted using the scheduler culture. For example TitleFormat="{0:MMMM yyyy}" displays the month and year of the first date. TitleFormatter takes precedence when both are set.

Declaration
public string TitleFormat { get; set; }
Property Value
Type Description
stringGets or sets a composite format string used to format the view title. Argument {0} is the first date and argument {1} is the last date displayed by the view. The dates are formatted using the scheduler culture. For example TitleFormat="{0:MMMM yyyy}" displays the month and year of the first date. TitleFormatter takes precedence when both are set.

TitleFormatterLink to this section

Gets or sets a function which returns the view title. It is invoked with the first and the last date displayed by the view. Takes precedence over TitleFormat.

Declaration
public Func<DateTime, DateTime, string> TitleFormatter { get; set; }
Property Value
Type Description
Func<DateTime, DateTime, string>Gets or sets a function which returns the view title. It is invoked with the first and the last date displayed by the view. Takes precedence over TitleFormat.

Methods

AppointmentsForResourcesLink to this section

Returns the appointments which belong to every resource item of the specified combination.

Declaration
protected IList<AppointmentData> AppointmentsForResources(IEnumerable<AppointmentData> appointments, IDictionary<string, object> resources)
Parameters
Type Name Description
IEnumerable<AppointmentData> appointments The appointments to filter.
IDictionary<string, object> resources The resource items keyed by resource type name.
Returns
Type Description
IList<AppointmentData>The appointments of the specified resource combination.

DisposeLink to this section

Disposes this instance.

Declaration
public void Dispose()

FormatTitleLink to this section

Formats the view title using TitleFormatter or TitleFormat when set, otherwise returns the default title.

Declaration
protected string FormatTitle(DateTime start, DateTime end, string title)
Parameters
Type Name Description
DateTime start The first date displayed by the view.
DateTime end The last date displayed by the view.
string title The default title.
Returns
Type Description
stringThe formatted title.

IsFirstResourcePathLink to this section

Determines whether the specified combination is the first combination of ResourcePaths. Used to render shared chrome such as the time ruler only once when the groups are rendered side by side.

Declaration
protected bool IsFirstResourcePath(IDictionary<string, object> resources)
Parameters
Type Name Description
IDictionary<string, object> resources The resource items keyed by resource type name.
Returns
Type Description
booltrue if the combination consists of the first item of every resource type; otherwise, false.

LocalizeLink to this section

Gets a localized string for the specified resource key.

Declaration
public string Localize(string key)
Parameters
Type Name Description
string key
Returns
Type Description
string

NextLink to this section

Returns a new date when the user clicks the next button of RadzenScheduler.

Declaration
public abstract DateTime Next()
Returns
Type Description
DateTimeThe next date. For example a day view will return the next day, a week view will return the next week.

OnAppointmentMoveLink to this section

Handles appointent move event.

Declaration
public Task OnAppointmentMove(SchedulerAppointmentMoveEventArgs data)
Parameters
Type Name Description
SchedulerAppointmentMoveEventArgs data
Returns
Type Description
Task

PrevLink to this section

Returns a new date when the user clicks the previous button of RadzenScheduler.

Declaration
public abstract DateTime Prev()
Returns
Type Description
DateTimeThe previous date. For example a day view will return the previous day, a week view will return the previous week.

RenderLink to this section

Renders this instance.

Declaration
public abstract RenderFragment Render()
Returns
Type Description
RenderFragment

SetParametersAsyncLink to this section

Called by the Blazor runtime when parameters are set.

Declaration
public override Task SetParametersAsync(ParameterView parameters)
Parameters
Type Name Description
ParameterView parameters The parameters.
Returns
Type Description
Task
An error has occurred. This app may no longer respond until reloaded. Reload 🗙