New to Telerik UI for Blazor? Download Free 30-day trial
Scheduler - Templates
- EXAMPLE
- VIEW SOURCE
- EDIT IN TELERIK REPL
- Change Theme
default
04-10
05-10
06-10
07-10
08-10
09-10
10-10
- Templates.razor
- MeetingService.cs
- MeetingDto.cs
Description
The Telerik Blazor Scheduler component lets you customize the date header of the content table. You could change the way appointments and events look like, and what they contain. When you do that, you will not lose built-in features such as the Delete icon, or dragging to resize or move the appointment.
By default, only the Title
of the appointment is shown in each event, and you can change that through the ItemTemplate
and AllDayItemTemplate
. You can set that content for the entire scheduler so all appointments use it, or you can set or override it per view. For example, you could have the week and multi-day views render the appointments one way, but the day or month views to use different template because the have, in general, a rather different styling.
You can use those templates to add more content - such as the start and end time, icons, customized action buttons and so on. You can add that content conditionally based on the application logic and apply the required styling. Since this is a Blazor app, you have access to the view-model data and so you can write more complex logic that takes into account component settings such as slot duration, component size, number of days, current date, and so on.
Moreover, you can add a CSS class to the entire appointment conditionally through the OnItemRender
event. This lets you cascade through it and style the entire element, not just your content. This can be useful for making certain appointments use a given color that is not the default.
The views of the Scheduler additionally exposes SlotTemplate
configuration that allows for adding arbitrary content to the slot cells. It can be used in conjunction with the OnCellRender
event to utilize full control over the appearance of the Scheduler's content.'