Changing the visible date programmatically

3 posts, 0 answers
  1. Eric
    Eric avatar
    9 posts
    Member since:
    Jun 2011

    Posted 28 Sep 2011 Link to this post

    I'm trying to change the visible day or week of a Schedule View through code. When it loads up it uses today's date or the current week. I would like to set it with another control. I would also like to control the visible date range. How would I access and change these properties?
  2. Yana
    Admin
    Yana avatar
    4709 posts

    Posted 28 Sep 2011 Link to this post

    Hello Eric,

    You just need to set CurrentDate property of the RadScheduleView:

    scheduleView.CurrentDate = new DateTime(2011, 9, 1, 0, 0, 0);

    As to the other question - you can use VisibleRangeChanged event and set the CurrentDate in its handler when the user switches to dates outside the needed range.

    The other option is to set read-only slots as explained here.

    Hope this helps.

    Best wishes,
    Yana
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. Eric
    Eric avatar
    9 posts
    Member since:
    Jun 2011

    Posted 28 Sep 2011 Link to this post

    Thank,s Yana.

    That's exactly what I needed.
Back to Top