This is a migrated thread and some comments may be shown as answers.

Change "day header" or "week horizontal header"

9 Answers 308 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
samin
Top achievements
Rank 1
samin asked on 30 Apr 2011, 08:50 AM
Hi

when i worked on Scheduler ,I could change "Day Header" and "Week Vertical header" in Scheduler Template file
for example below code:
<TextBlock x:Name="HeaderTextBlock1" Grid.Column="0" FontWeight="Bold" Margin="0 0 4 0" Text="{Binding Start,Converter={StaticResource DateTimeToStringConvert},ConverterParameter='dd'}"/>

or in another line
<telerik:RadButton x:Name="Holder" Content="{Binding ., Converter={StaticResource DatetimeToWeekConverter}}" Command="telerikScheduler:RadSchedulerCommands.SetWeekViewMode" Foreground="{StaticResource MonthWeekHeaderForegroundBrush}" Margin="{StaticResource MonthVerticalHeaderMargin}" Style="{StaticResource VerticalHeaderButton}" Canvas.ZIndex="{Binding (Canvas.ZIndex), Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"/>

but I can't find related section in ScheduleView Template file. How can i customize titles in scheduleView.

i don't want to change format string! i want to convert date time to another calendar.
Thanks

9 Answers, 1 is accepted

Sort by
0
samin
Top achievements
Rank 1
answered on 04 May 2011, 06:14 AM
Hello,
Please give a solution to me for that!
0
Pana
Telerik team
answered on 06 May 2011, 06:52 AM
Hi,

There is a GroupHeaderContentTemplateSelector that we have created exactly for such reasons. It contains all the templates you need. They show both GroupHeaders grouping by DateTime and GroupHeaders grouping by resource. You can create a converter that will return the resource name if it is not date time and the target calendar header string if the Name property in the data template cnotains DateTime.

I have attached a project with all the styles for RadScheduleView as well as moved the one you will need in the MainPaged with coments on the places you have to put your converter.

Kind regards,
Pana
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
samin
Top achievements
Rank 1
answered on 10 May 2011, 04:38 AM
Hi,
Thanks for your notice...
I download your sample. and it doesn't have especial in appearance. so I saw source and I noticed that the them file source commented in App.xaml. I uncommented it ... and appearance below exception on screen


Line: 54
Error: Unhandled Error in Silverlight Application
Code: 2500   
Category: ParserError      
Message: The property 'ComputedAppointmentNavigationButtonsVisibility' was not found in type 'Telerik.Windows.Controls.RadScheduleView'.    
File:     
Line: 2668    
Position: 21

what should I do?
0
samin
Top achievements
Rank 1
answered on 10 May 2011, 05:42 AM
Hello.
I found out. It's not necessory to uncomment app resource source. you put template on main.xaml.


anyway....It's not clear for me how can I customized it?
I want to below customization:

Day View: header of day -> I want to get datetime of it and convert  to appropriate title.
Week View:  ............................such as abow.................................................
Month View: each slot show it's day of month( 2 , 3 or ...) I want to get datetime of it and convert  to appropriate title. for example maybe it is third day of month but it's first in another calendar
    in vertical title I want to convert it as well.

I do this customization in Scheduler control...but I'm confuzed to customize schedulerView

0
Pana
Telerik team
answered on 12 May 2011, 07:26 AM
Hi,

Please refer to the newly attached project. I have placed Select and converter for you as well as some comments how you can use them to customize the GroupHeader. Does they work for you? If there are more strings you need to override probably they are in the TimeRulerItems and can be customized the same way only using the TimeRulerItemTemplateSelector the same way it is done for the GroupHeaderContentTemplateSelector. All styles can be found in the attached project.

Kind regards,
Pana
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
samin
Top achievements
Rank 1
answered on 23 May 2011, 09:24 AM

thanks.....
your solution is very helpful and I cant do it!

but just in TimelineViewDefenition doesn't work! is there any special reason for that?
0
Pana
Telerik team
answered on 26 May 2011, 08:09 AM
Hello samin,

Information about which-is-what in the ScheduleView is available here:

http://www.telerik.com/help/silverlight/radscheduleview-styles-and-templates-styling-timeruleritems.html
http://www.telerik.com/help/silverlight/radscheduleview-styles-and-templates-styling-groupheaders.html

You can edit the TimeRulerItemTemplateSelector the same way we did for the GroupHeaderContentTemplateSelector and change the HorizontalTimelineGroupTemplate.

Greetings,
Pana
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
asanka
Top achievements
Rank 1
answered on 06 Mar 2015, 03:06 AM
I'm quite new to the RasScheduleView.

I just want to change the Color(Red) of the  header Date text if day is holiday.

I tried to customizing  GroupHeaderContentTemplateSelector  as well.

But It didn't work.

Please Help me o this.


0
Masha
Telerik team
answered on 09 Mar 2015, 01:41 PM
Hello Samin,

I suggest you using GroupHeaderStyleSelector  instead of GroupHeaderContentTemplateSelector. Also you need to modify the control template of GroupHeaderButtonStyle and to remove the Storyboard for NotToday visual state.

I've uploaded a sample project (using implicit styles and Windows8 theme)  with the above approach.

I hope it helps.

Regards,
Masha
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
ScheduleView
Asked by
samin
Top achievements
Rank 1
Answers by
samin
Top achievements
Rank 1
Pana
Telerik team
asanka
Top achievements
Rank 1
Masha
Telerik team
Share this question
or