how to change month on-demand ?

I am new to syncfusion schedule.


currently,I make a schedule control as month view type on the form and load whole year's items into scheduleProvider.


I also hide the caption panel and navigation panel to fit my layout.

now,I want to change the month on-demand.


I tried to chage ScheduleControl1.Calendar.DateValue property.


but it does'nt work.


can you give me some advance?





2 Replies

AD Administrator Syncfusion Team June 26, 2008 03:37 PM UTC

Try code like this. It also sets the appropriate date in the Navigation Calendar.

this.scheduleControl1.Calendar.DateValue = DateTime.Now.Date;
this.scheduleControl1.Calendar.Today = DateTime.Now.Date;

//use begin/endupdates avoid possible blinking
//clear the selected dates in the calendar and set the desired dates
this.scheduleControl1.GetScheduleHost().BeginUpdate();
this.scheduleControl1.Calendar.SelectedDates.BeginUpdate();
this.scheduleControl1.Calendar.SelectedDates.Clear();
this.scheduleControl1.Calendar.SelectedDates.Add(DateTime.Now.Date);
this.scheduleControl1.Calendar.SelectedDates.EndUpdate();
this.scheduleControl1.GetScheduleHost().EndUpdate();




AD Administrator Syncfusion Team June 26, 2008 04:19 PM UTC

thanks for your quick answering. :)

by the way, I really feel a bit surprised cause this action needs so many lines of code as your answering.


Loader.
Up arrow icon