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

TimelineView hours scale, setting the start hour of the day

1 Answer 58 Views
Scheduler and Reminder
This is a migrated thread and some comments may be shown as answers.
Pirjo
Top achievements
Rank 1
Pirjo asked on 17 Feb 2015, 11:34 AM
Hi,

I'm using the timelineview with Timescales.Hours. I would like to set the view so that the first hour displayed in the left side would be the one that has the first appointment of the day.

How can I achieve this in the code (vb.net)?

a) I know that I can set the start date, but can I set the start hour somehow? If I know, for example, that the first appointment is at 14:15, can I set the start hour to 14:00?

b) Or can I scroll to the first appointment of the day, so that the first appointment would be displayed in the left side of the view?

I'm using Telerik UI for Winforms Q3 2014 SP1


Br,
Pirjo

1 Answer, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 18 Feb 2015, 11:31 AM
Hello Pirjo,

Thank you for writing.

You can set the SchedulerTimelineView.StartDate property specifying the time part as well. Here is a sample code snippet which result is illustrated on the attached screenshot.
Sub New()
    InitializeComponent()
 
    Me.RadScheduler1.ActiveViewType = Telerik.WinControls.UI.SchedulerViewType.Timeline
    Dim timelineView As SchedulerTimelineView = Me.RadScheduler1.GetTimelineView()
    Dim scale As Timescales = Timescales.Hours
    timelineView.ShowTimescale(scale)
    timelineView.StartDate = New Date(2015, 2, 22, 14, 0, 0)
End Sub

In order to navigate the SchedulerTimelineView to a specific DateTime, you can use the SchedulerTimelineView.GetViewContainingDate method:
Dim timelineView As SchedulerTimelineView = Me.RadScheduler1.GetTimelineView()
Me.RadScheduler1.ActiveView = timelineView.GetViewContainingDate(New DateTime(2015, 3, 29, 15, 0, 0))

I hope this information helps. Should you have further questions, I would be glad to help.
 
Regards,
Dess
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
Scheduler and Reminder
Asked by
Pirjo
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or