ScrollToVerticalOffset for RadScheduleView

2 posts, 0 answers
  1. Alex Silva
    Alex Silva avatar
    2 posts
    Member since:
    Jan 2010

    Posted 14 Aug 2012 Link to this post

    Is there a ScrollToVerticalOffset method or workaround for achieving the same effect for the RadScheduleView.  If not, are there any plans to implement one?
  2. Vladi
    Admin
    Vladi avatar
    744 posts

    Posted 17 Aug 2012 Link to this post

    Hi Alex,

    You can use the FirstVisibleTime property of RadScheduleView to achieve the wanted behavior, you will also need to handle the VisibleRangeChanged event because the FirstVisibleTime property is only applied for the first visible view and after changing the view the default FirstVisibleTime is used.

    You can set up the wanted behavior like this:

    In the XAML:
    <telerik:RadScheduleView x:Name="theScheduleView"
                                FirstVisibleTime="08:00"
                                VisibleRangeChanged="theScheduleView_VisibleRangeChanged">
        ...
    </telerik:RadScheduleView>

    and in the code behind:
    private void theScheduleView_VisibleRangeChanged(object sender, EventArgs e)
    {
        Dispatcher.BeginInvoke(new Action(() => { this.theScheduleView.ScrollTimeRuler(new TimeSpan(8, 0, 0), true, true); }));
    }

    Note that there is a known issue with this approach when changing from MonthView to the other views and it will be fixed in future releases.

    Hope this helps.

    Greetings,
    Vladi
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. DevCraft banner
Back to Top