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

How to scroll to work time in the week view?

1 Answer 66 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Björn
Top achievements
Rank 1
Björn asked on 21 Mar 2012, 10:32 AM
I've defined a slot to mark the none work time in a light blue.
With the current WeekViewDefinition it will show the schedule with the vertical scroll bar (see attachment).
<telerik:WeekViewDefinition MinTimeRulerExtent="800"
    MajorTickLength="1h" MinorTickLength="1h"
    TimerulerMajorTickStringFormat="{}{0:%H}h " FirstDayOfWeek="Monday" VisibleDays="7"/>

How can I force to automatically scroll to time ruler starting at 7h (see attachment) or just scroll into the middle of the scroll bar?

1 Answer, 1 is accepted

Sort by
0
Accepted
Konstantina
Telerik team
answered on 23 Mar 2012, 03:58 PM
Hi Björn,

In order to scroll to the first working hour you can use the ScrollIntoView method of the ScheduleView. You might need to wrap it in a Dispatcher, though. For example:

Dispatcher.BeginInvoke(() =>
{
    schview.ScrollIntoView(newSlot(newDateTime(2012, 1, 13, 11, 0, 0), newDateTime(2012, 1, 13, 12, 0, 0)), true);
});


Kind regards,
Konstantina
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
ScheduleView
Asked by
Björn
Top achievements
Rank 1
Answers by
Konstantina
Telerik team
Share this question
or