RadzenSchedulerResource Class

Defines a resource type (rooms, people, equipment) of RadzenScheduler<T>. Declare one instance per resource type as child content of the scheduler. Views group appointments by the declared resource types when their GroupByResource property is set to true. The order of declaration determines the grouping hierarchy - the first resource type is the top level.

Inheritance

Object

ComponentBase

RadzenSchedulerResource

Implements

IComponent

IHandleEvent

IHandleAfterRender

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 class RadzenSchedulerResource : ComponentBase, IComponent, IHandleEvent, IHandleAfterRender

Examples

<RadzenScheduler Data="@bookings" StartProperty="Start" EndProperty="End" TextProperty="Text">
    <RadzenSchedulerResource Name="Room" Data="@rooms" Property="RoomId" TextProperty="Name" ValueProperty="Id" />
    <RadzenSchedulerResource Name="Employee" Data="@employees" Property="EmployeeIds" TextProperty="FullName" ValueProperty="Id" />
    <RadzenDayView GroupByResource="true" />
</RadzenScheduler>

Constructors

RadzenSchedulerResourceLink to this section

Defines a resource type (rooms, people, equipment) of RadzenScheduler<T>. Declare one instance per resource type as child content of the scheduler. Views group appointments by the declared resource types when their GroupByResource property is set to true. The order of declaration determines the grouping hierarchy - the first resource type is the top level.

Declaration
public RadzenSchedulerResource()

Properties

DataLink to this section

Gets or sets the collection of resource items of this type.

Declaration
public Collections.IEnumerable Data { get; set; }
Property Value
Type Description
Collections.IEnumerableGets or sets the collection of resource items of this type.

HeaderTemplateLink to this section

Gets or sets the template used to render the headers of this resource type in views which group appointments by resource. The resource item is passed as context.

Declaration
public RenderFragment<object> HeaderTemplate { get; set; }
Property Value
Type Description
RenderFragment<object>Gets or sets the template used to render the headers of this resource type in views which group appointments by resource. The resource item is passed as context.

ItemsLink to this section

Gets the resource items as a list.

Declaration
public IList<object> Items { get; }
Property Value
Type Description
IList<object>Gets the resource items as a list.

NameLink to this section

Gets or sets the name of the resource type. Used as key in Resources and related event arguments. Set to the value of Property by default.

Declaration
public string Name { get; set; }
Property Value
Type Description
stringGets or sets the name of the resource type. Used as key in Resources and related event arguments. Set to the value of Property by default.

PropertyLink to this section

Specifies the property of an appointment data item which contains the value of the resource it belongs to. The property value is compared to the value of ValueProperty of every resource item. Collection properties are supported - the appointment is displayed for every resource item whose value the collection contains.

Declaration
public string Property { get; set; }
Property Value
Type Description
stringSpecifies the property of an appointment data item which contains the value of the resource it belongs to. The property value is compared to the value of ValueProperty of every resource item. Collection properties are supported - the appointment is displayed for every resource item whose value the collection contains.

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.

TextPropertyLink to this section

Specifies the property of a resource item which contains its display text. The resource item itself is used when not set.

Declaration
public string TextProperty { get; set; }
Property Value
Type Description
stringSpecifies the property of a resource item which contains its display text. The resource item itself is used when not set.

ValuePropertyLink to this section

Specifies the property of a resource item which contains its unique value. The resource item itself is used when not set.

Declaration
public string ValueProperty { get; set; }
Property Value
Type Description
stringSpecifies the property of a resource item which contains its unique value. The resource item itself is used when not set.

Methods

DisposeLink to this section

Disposes this instance.

Declaration
public void Dispose()

GetTextLink to this section

Gets the display text of the specified resource item.

Declaration
public string GetText(object item)
Parameters
Type Name Description
object item The resource item.
Returns
Type Description
stringThe display text.

IsAppointmentInResourceLink to this section

Determines whether the specified appointment belongs to the specified resource item of this type.

Declaration
public bool IsAppointmentInResource(AppointmentData appointment, object item)
Parameters
Type Name Description
AppointmentData appointment The appointment to check.
object item The resource item.
Returns
Type Description
booltrue if the appointment belongs to the resource item; otherwise, false.

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
Returns
Type Description
Task
An error has occurred. This app may no longer respond until reloaded. Reload 🗙