# SchedulerViewBase Class

A base class for [RadzenScheduler<T>](https://blazor.radzen.com/docs/api/Radzen.Blazor.RadzenScheduler-1.md) views.

Namespace: [Radzen.Blazor](https://blazor.radzen.com/docs/api/Radzen.Blazor.md)

Assembly: Radzen.Blazor.dll

## Inheritance

- Object
- ComponentBase
- SchedulerViewBase

Derived types: [RadzenAgendaView](https://blazor.radzen.com/docs/api/Radzen.Blazor.RadzenAgendaView.md), [RadzenDayView](https://blazor.radzen.com/docs/api/Radzen.Blazor.RadzenDayView.md), [RadzenMonthView](https://blazor.radzen.com/docs/api/Radzen.Blazor.RadzenMonthView.md), [RadzenMultiDayView](https://blazor.radzen.com/docs/api/Radzen.Blazor.RadzenMultiDayView.md), [RadzenWeekView](https://blazor.radzen.com/docs/api/Radzen.Blazor.RadzenWeekView.md), [SchedulerYearViewBase](https://blazor.radzen.com/docs/api/Radzen.Blazor.SchedulerYearViewBase.md), [RadzenGanttDayView<TItem>](https://blazor.radzen.com/docs/api/Radzen.Blazor.RadzenGanttDayView-1.md), [RadzenGanttMonthView<TItem>](https://blazor.radzen.com/docs/api/Radzen.Blazor.RadzenGanttMonthView-1.md), [RadzenGanttWeekView<TItem>](https://blazor.radzen.com/docs/api/Radzen.Blazor.RadzenGanttWeekView-1.md), [RadzenGanttYearsView<TItem>](https://blazor.radzen.com/docs/api/Radzen.Blazor.RadzenGanttYearsView-1.md), [RadzenGanttYearView<TItem>](https://blazor.radzen.com/docs/api/Radzen.Blazor.RadzenGanttYearView-1.md)

## Implements

- IComponent
- IHandleEvent
- IHandleAfterRender
- [ISchedulerView](https://blazor.radzen.com/docs/api/Radzen.Blazor.ISchedulerView.md)

## Syntax

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

## Constructors

| Constructor | Description |
|-------------|-------------|
| `protected SchedulerViewBase()` | A base class for [RadzenScheduler<T>](https://blazor.radzen.com/docs/api/Radzen.Blazor.RadzenScheduler-1.md) views. |

## Properties

| Property | Type | Description |
|------|------|-------------|
| EndDate | `DateTime` | Gets the end date. |
| GroupBy | `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. |
| GroupByResource | `bool` | Gets or sets a value indicating whether the view groups appointments by the resource types of the scheduler (declared as [RadzenSchedulerResource](https://blazor.radzen.com/docs/api/Radzen.Blazor.RadzenSchedulerResource.md) child content). Set to false by default. |
| GroupOrientation | [`Orientation`](https://blazor.radzen.com/docs/api/Radzen.Orientation.md) | 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. |
| HasResourceGroups | `bool` | Gets a value indicating whether the view should render resource groups - GroupByResource is set and the scheduler has resources with items. |
| Icon | `string` | Gets the icon of the view. It is displayed in the view switching UI. |
| ResourcePaths | `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. |
| ResourceTypes | `IList<RadzenSchedulerResource>` | Gets the resource types the view groups by - the declared resource types filtered and ordered by GroupBy. |
| Scheduler | [`IScheduler`](https://blazor.radzen.com/docs/api/Radzen.Blazor.IScheduler.md) | Gets or sets the scheduler instance. |
| StartDate | `DateTime` | Gets the start date. |
| Text | `string` | Gets the text of the view. It is displayed in the view switching UI. |
| Title | `string` | Gets the title of the view. It is displayed in the RadzenScheduler title area. |
| TitleFormat | `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. |
| TitleFormatter | `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

| Method | Returns | Description |
|------|---------|-------------|
| `AppointmentsForResources(IEnumerable<AppointmentData> appointments, IDictionary<string, object> resources)` | `IList<AppointmentData>` | Returns the appointments which belong to every resource item of the specified combination. Parameters: `appointments`: The appointments to filter. `resources`: The resource items keyed by resource type name. Returns: The appointments of the specified resource combination. |
| `Dispose()` | `void` | Disposes this instance. |
| `FormatTitle(DateTime start, DateTime end, string title)` | `string` | Formats the view title using TitleFormatter or TitleFormat when set, otherwise returns the default title. Parameters: `start`: The first date displayed by the view. `end`: The last date displayed by the view. `title`: The default title. Returns: The formatted title. |
| `IsFirstResourcePath(IDictionary<string, object> resources)` | `bool` | 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. Parameters: `resources`: The resource items keyed by resource type name. Returns: true if the combination consists of the first item of every resource type; otherwise, false. |
| `Localize(string key)` | `string` | Gets a localized string for the specified resource key. |
| `Next()` | `DateTime` | Returns a new date when the user clicks the next button of RadzenScheduler. Returns: The next date. For example a day view will return the next day, a week view will return the next week. |
| `OnAppointmentMove(SchedulerAppointmentMoveEventArgs data)` | `Task` | Handles appointent move event. |
| `Prev()` | `DateTime` | Returns a new date when the user clicks the previous button of RadzenScheduler. Returns: The previous date. For example a day view will return the previous day, a week view will return the previous week. |
| `Render()` | `RenderFragment` | Renders this instance. |
| `SetParametersAsync(ParameterView parameters)` | `Task` | Called by the Blazor runtime when parameters are set. Parameters: `parameters`: The parameters. |

## Inherited Members

- From ComponentBase: Assets, AssignedRenderMode, BuildRenderTree, DispatchExceptionAsync, InvokeAsync, OnAfterRender, OnAfterRenderAsync, OnInitialized, OnInitializedAsync, OnParametersSet, OnParametersSetAsync, RendererInfo, ShouldRender, StateHasChanged

