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.

Navigation Calendar

Thread ID:





64462 Jul 20,2007 02:15 PM Jul 23,2007 09:51 AM Windows Forms 2
Tags: ScheduleControl
Asked On July 20, 2007 02:15 PM

Is there any way to make the navigation calendar's date bold when an item is scheduled for that day? Similar to Outlook’s Calendar when a appointment is scheduled?



Administrator [Syncfusion]
Replied On July 20, 2007 06:37 PM

There is no built-in support for this currently. But you can try doing it through the underlying grid's PrepareViewStyleInfo event handle. In the Recurrence sample we ship, you can add this code at the bottom of Form.Load to subscribe to the event.

this.scheduleControl1.Calendar.CalenderGrid.PrepareViewStyleInfo += new GridPrepareViewStyleInfoEventHandler(CalenderGrid_PrepareViewStyleInfo);

Then in the event handler, you can use this code:

void CalenderGrid_PrepareViewStyleInfo(object sender, GridPrepareViewStyleInfoEventArgs e)
DateTime dt;
if (e.Style.Text.Length > 0 && DateTime.TryParse(e.Style.Text, out dt))
GridControl grid = sender as GridControl;
IScheduleDataProvider dataProvider = this.scheduleControl1.DataSource;
IScheduleAppointmentList list = dataProvider.GetScheduleForDay(dt);
if (list.Count > 0)
e.Style.Font.Bold = true;

Replied On July 23, 2007 09:51 AM

That worked great. Thank You.


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.