We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

how to change month on-demand ?

Thread ID:

Created:

Updated:

Platform:

Replies:

74746 Jun 26,2008 10:53 AM Jun 26,2008 12:19 PM Windows Forms 2
loading
Tags: ScheduleControl
Administrator [Syncfusion]
Asked On June 26, 2008 10:53 AM

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?





Administrator [Syncfusion]
Replied On June 26, 2008 11:37 AM

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();



Administrator [Syncfusion]
Replied On June 26, 2008 12:19 PM

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.


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;