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

How to change the FirstDayOfweek in TimelineViewDefinition ?

5 Answers 160 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Eric
Top achievements
Rank 1
Eric asked on 22 May 2013, 03:27 PM
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.

5 Answers, 1 is accepted

Sort by
0
Kalin
Telerik team
answered on 27 May 2013, 02:40 PM
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.

0
Eric
Top achievements
Rank 1
answered on 28 May 2013, 06:57 AM
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.
0
Kalin
Telerik team
answered on 28 May 2013, 08:02 AM
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.

0
Eric
Top achievements
Rank 1
answered on 28 May 2013, 11:28 AM
With this solution I have an other problem.
If I change the current date the DayView doesn't change.

Eric.
0
Kalin
Telerik team
answered on 31 May 2013, 09:15 AM
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.

Tags
ScheduleView
Asked by
Eric
Top achievements
Rank 1
Answers by
Kalin
Telerik team
Eric
Top achievements
Rank 1
Share this question
or