Scheduler days 2 digit size

2 posts, 0 answers
  1. Mehmet
    Mehmet avatar
    33 posts
    Member since:
    Jul 2010

    Posted 29 Jul 2012 Link to this post


    I want to change Scheduler days view from 3 digit to 2 digit.
    What should I do?
    Sample code is below.

        <telerik:TimelineViewDefinition VisibleDays="31" TimerulerGroupStringFormat="{}{0:dd ddd}"
           TimerulerMajorTickStringFormat="{}{0:%M}.{0:%d}"  LargeChangeInterval="15d" MajorTickLength="1d"
            MinorTickLength="1d" GroupTickLength="1d"/>


  2. Yana
    Yana avatar
    5043 posts

    Posted 02 Aug 2012 Link to this post

    Hello Mehmet,

    We are using the standard date and time format strings described in this article. Note that there is no format string for 2 digit days. Anyway, I can suggest you a different approach to achieve the requirement - you could set the TimeRulerItemTemplateSelector property of the ScheduleView and customize the needed text in the Group TimeRulerItem.  You should use HorizontalTimelineGroupTemplate property  - I would suggest to create a ValueConverter to convert the day name:

    <local:TimeRulerItemTemplateSelector x:Key="CustomTimeRulerItemTemplateSelector">
                <TextBlock Text="{Binding FormattedValue, Converter={StaticResource DayConverter}}" Margin="2 1" TextAlignment="Left" />

    I've attached a simple example to demonstrate the approach. Hope this helps.

    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top