Scheduler Timelineview Header Date Format

1 Answer 68 Views
ScheduleView
Romano
Top achievements
Rank 1
Romano asked on 11 Jan 2023, 01:40 PM | edited on 12 Jan 2023, 12:48 PM

Hello,

I try to adjust the header from "default view.jpg" to "wanted view.jpg".

Where can i set the date format as i want it?

I've tried the approach from this link WPF ScheduleView - Styling the GroupHeaders - Telerik UI for WPF. But it didn't worked at all. Even by coping the exact code from your tutorial i get the error on pic: error custom template.JPG

Also is it possible to highlight the weekends in a certain color?

Is it possible to highlight specific dates like public holiday days also in a certain color?

I haven't really found anything about adding a new row on the timeline view, like i need in my "wanted-view.jpg" picture.

 

best regards

1 Answer, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 16 Jan 2023, 10:49 AM

Hello Romano,

You can check the following article which shows how to replace the headers using custom DataTemplates: https://docs.telerik.com/devtools/wpf/controls/radscheduleview/styles-and-templates/templating-groupheaders

About the error in the picture, this happens because you cannot add the style selector as the direct content of a control (ex: RadScheduleView). In this case, you can define the selector in the Resources collection of the Window or the UserControl that hosts the RadScheduleView control and then assign it, using the StaticResource keyword. The same goes for any Style, DataTemplate, StyleSelector or DataTemplateSelector objects.

<Window x:Class="WpfApp92.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:WpfApp92" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
        mc:Ignorable="d"
        Title="MainWindow" Height="450" Width="800">
	
	<Window.Resources>
		<local:CustomGroupHeaderContentTemplateSelector x:Key="CustomGroupHeaderContentTemplateSelector"> 
		  <!-- some more XAML here -->
		</local:CustomGroupHeaderContentTemplateSelector> 
	</Window.Resources>
	
	<Grid>
		<telerik:RadScheduleView AppointmentsSource="{Binding Appointments}"  
								 GroupHeaderContentTemplateSelector="{StaticResource CustomGroupHeaderContentTemplateSelector}"> 
			<!-- other XAML here if needed -->
		</telerik:RadScheduleView> 
	</Grid>	
</Window>

The same goes for the StyleSelector, defined in your example.

About the highlight of specific days, you can use the special slots feature.

I hope this information helps.

Regards,
Martin Ivanov
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
ScheduleView
Asked by
Romano
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Share this question
or