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

Changing the visible date programmatically

2 Answers 158 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Eric
Top achievements
Rank 1
Eric asked on 28 Sep 2011, 01:31 PM
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 Answers, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 28 Sep 2011, 01:56 PM
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 >>

0
Eric
Top achievements
Rank 1
answered on 28 Sep 2011, 03:06 PM
Thank,s Yana.

That's exactly what I needed.
Tags
ScheduleView
Asked by
Eric
Top achievements
Rank 1
Answers by
Yana
Telerik team
Eric
Top achievements
Rank 1
Share this question
or