Change "day header" or "week horizontal header"

10 posts, 0 answers
  1. samin
    samin avatar
    27 posts
    Member since:
    Feb 2011

    Posted 30 Apr 2011 Link to this post

    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
  2. samin
    samin avatar
    27 posts
    Member since:
    Feb 2011

    Posted 04 May 2011 Link to this post

    Hello,
    Please give a solution to me for that!
  3. DevCraft banner
  4. Pana
    Admin
    Pana avatar
    748 posts

    Posted 06 May 2011 Link to this post

    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
  5. samin
    samin avatar
    27 posts
    Member since:
    Feb 2011

    Posted 09 May 2011 Link to this post

    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?
  6. samin
    samin avatar
    27 posts
    Member since:
    Feb 2011

    Posted 10 May 2011 Link to this post

    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

  7. Pana
    Admin
    Pana avatar
    748 posts

    Posted 12 May 2011 Link to this post

    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
  8. samin
    samin avatar
    27 posts
    Member since:
    Feb 2011

    Posted 23 May 2011 Link to this post


    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?
  9. Pana
    Admin
    Pana avatar
    748 posts

    Posted 26 May 2011 Link to this post

    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
  10. asanka
    asanka avatar
    6 posts
    Member since:
    Mar 2015

    Posted 05 Mar 2015 in reply to Pana Link to this post

    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.


  11. Masha
    Admin
    Masha avatar
    355 posts

    Posted 09 Mar 2015 Link to this post

    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.

     
Back to Top
DevCraft banner