How to change the FirstDayOfweek in TimelineViewDefinition ?

6 posts, 0 answers
  1. Eric
    Eric avatar
    5 posts
    Member since:
    May 2013

    Posted 22 May 2013 Link to this post

    Hello,

    I use a RadScheduleView with the 4 differents view (day/week/month/timeline).
    All works fine but for the Timeline view I want to show a week.
    I have made :
    <telerik:TimelineViewDefinition FirstDayOfWeek="Monday" VisibleDays="5" TimerulerMajorTickStringFormat="{}{0:HH:mm}"/>

    But the first day visible is today and not Monday. What can I do for start the timeline Monday ?

    Best regards,

    Eric.
  2. Kalin
    Admin
    Kalin avatar
    1207 posts

    Posted 27 May 2013 Link to this post

    Hi Eric,

    In order to change the start date of the TimelineViewDefinition you should set the CurrentDate property of the ScheduleView to the needed value,  please check the ViewDefinitions article from our documentation for more details.

    Hope this helps.

    Regards,
    Kalin
    Telerik

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. UI for WPF is Visual Studio 2017 Ready
  4. Eric
    Eric avatar
    5 posts
    Member since:
    May 2013

    Posted 28 May 2013 Link to this post

    It works for the timeline view but with this solution the DayView have also changed.
    I would like to have the dayView with today as current day and the timelineView with one week visible and monday as first day.
    Do you have a idea of how do this ?

    Thank you,

    Eric.
  5. Kalin
    Admin
    Kalin avatar
    1207 posts

    Posted 28 May 2013 Link to this post

    Hi Eric,

    I would suggest that you use a custom DayViewDefinitiion in order to make it show different date than the one set as CurrentDate. Please see the How to configure the VisibleRange article from our documentation for more detailed information about this.

    I've also attached a sample project using CustomDayViewDefinitiion class which inherits from DayViewDefinition to demonstrate exactly the approach.

    Regards,
    Kalin
    Telerik

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  6. Eric
    Eric avatar
    5 posts
    Member since:
    May 2013

    Posted 28 May 2013 Link to this post

    With this solution I have an other problem.
    If I change the current date the DayView doesn't change.

    Eric.
  7. Kalin
    Admin
    Kalin avatar
    1207 posts

    Posted 31 May 2013 Link to this post

    Hello Eric,

    In the sample project we overrode the GetVisibleRangeStart method in the CustomDayViewDefinition class in order to keep today date showing in the DayViewDefinitiion. If you need to achieve different scenario you should implement your custom logic in the GetVisibleRangeStart method of the CustomDayViewDefinition.

    Hope this helps.

    Regards,
    Kalin
    Telerik

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top
UI for WPF is Visual Studio 2017 Ready