A base class for RadzenScheduler<T> views.
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
public abstract class SchedulerViewBase : ComponentBase, IComponent, IHandleEvent, IHandleAfterRender, ISchedulerViewA base class for RadzenScheduler<T> views.
protected SchedulerViewBase()Gets the end date.
public DateTime EndDate { get; }
| Type | Description |
|---|---|
| DateTime | Gets the end date. |
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.
public string GroupBy { get; set; }
| Type | Description |
|---|---|
| string | 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. |
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.
public bool GroupByResource { get; set; }
| Type | Description |
|---|---|
| bool | 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. |
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.
public Orientation GroupOrientation { get; set; }
| Type | Description |
|---|---|
| Orientation | 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. |
Gets a value indicating whether the view should render resource groups - GroupByResource is set and the scheduler has resources with items.
protected bool HasResourceGroups { get; }
| Type | Description |
|---|---|
| bool | Gets a value indicating whether the view should render resource groups - GroupByResource is set and the scheduler has resources with items. |
Gets the icon of the view. It is displayed in the view switching UI.
public string Icon { get; }
| Type | Description |
|---|---|
| string | Gets the icon of the view. It is displayed in the view switching UI. |
Gets every combination of resource items the view groups by - the cartesian product of the items of ResourceTypes, each keyed by resource type Name.
protected IList<IDictionary<string, object>> ResourcePaths { get; }
| 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. |
Gets the resource types the view groups by - the declared resource types filtered and ordered by GroupBy.
protected IList<RadzenSchedulerResource> ResourceTypes { get; }
| Type | Description |
|---|---|
| IList<RadzenSchedulerResource> | Gets the resource types the view groups by - the declared resource types filtered and ordered by GroupBy. |
Gets or sets the scheduler instance.
public IScheduler Scheduler { get; set; }
| Type | Description |
|---|---|
| IScheduler | Gets or sets the scheduler instance. |
Gets the start date.
public DateTime StartDate { get; }
| Type | Description |
|---|---|
| DateTime | Gets the start date. |
Gets the text of the view. It is displayed in the view switching UI.
public string Text { get; set; }
| Type | Description |
|---|---|
| string | Gets the text of the view. It is displayed in the view switching UI. |
Gets the title of the view. It is displayed in the RadzenScheduler title area.
public string Title { get; }
| Type | Description |
|---|---|
| string | Gets the title of the view. It is displayed in the RadzenScheduler title area. |
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.
public string TitleFormat { get; set; }
| Type | Description |
|---|---|
| string | 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. |
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.
public Func<DateTime, DateTime, string> TitleFormatter { get; set; }
| 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. |
Returns the appointments which belong to every resource item of the specified combination.
protected IList<AppointmentData> AppointmentsForResources(IEnumerable<AppointmentData> appointments, IDictionary<string, object> resources)
| Type | Name | Description |
|---|---|---|
| IEnumerable<AppointmentData> | appointments | The appointments to filter. |
| IDictionary<string, object> | resources | The resource items keyed by resource type name. |
| Type | Description |
|---|---|
| IList<AppointmentData> | The appointments of the specified resource combination. |
Formats the view title using TitleFormatter or TitleFormat when set, otherwise returns the default title.
protected string FormatTitle(DateTime start, DateTime end, string title)
| 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. |
| Type | Description |
|---|---|
| string | The formatted title. |
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.
protected bool IsFirstResourcePath(IDictionary<string, object> resources)
| Type | Name | Description |
|---|---|---|
| IDictionary<string, object> | resources | The resource items keyed by resource type name. |
| Type | Description |
|---|---|
| bool | true if the combination consists of the first item of every resource type; otherwise, false. |
Gets a localized string for the specified resource key.
public string Localize(string key)
| Type | Name | Description |
|---|---|---|
| string | key |
| Type | Description |
|---|---|
| string |
Returns a new date when the user clicks the next button of RadzenScheduler.
public abstract DateTime Next()
| Type | Description |
|---|---|
| DateTime | The next date. For example a day view will return the next day, a week view will return the next week. |
Handles appointent move event.
public Task OnAppointmentMove(SchedulerAppointmentMoveEventArgs data)
| Type | Name | Description |
|---|---|---|
| SchedulerAppointmentMoveEventArgs | data |
| Type | Description |
|---|---|
| Task |
Returns a new date when the user clicks the previous button of RadzenScheduler.
public abstract DateTime Prev()
| Type | Description |
|---|---|
| DateTime | The previous date. For example a day view will return the previous day, a week view will return the previous week. |
Renders this instance.
public abstract RenderFragment Render()
| Type | Description |
|---|---|
| RenderFragment |
Called by the Blazor runtime when parameters are set.
public override Task SetParametersAsync(ParameterView parameters)
| Type | Name | Description |
|---|---|---|
| ParameterView | parameters | The parameters. |
| Type | Description |
|---|---|
| Task |