How to scroll to work time in the week view?

2 posts, 1 answers
  1. Björn
    Björn avatar
    23 posts
    Member since:
    Mar 2011

    Posted 21 Mar 2012 Link to this post

    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?
  2. Answer
    Konstantina avatar
    2332 posts

    Posted 23 Mar 2012 Link to this post

    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,
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  3. DevCraft R3 2016 release webinar banner
Back to Top