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.
Syncfusion Feedback

Custom Week Month Item Display Format

Thread ID:

Created:

Updated:

Platform:

Replies:

72708 Apr 1,2008 12:06 PM UTC Apr 2,2008 03:26 AM UTC Windows Forms 2
loading
Tags: ScheduleControl
Risath
Asked On April 1, 2008 12:06 PM UTC

Hi everyone,

I want to display the appointment in the format of "[subject] [starttime] - [endtime]".
I have set the WeekMonthItemFormat property of the schedule control like this

scheduleControl1.Appearance.WeekMonthItemFormat = "[subject] [starttime] - [endtime]";

But I get the output as "[subject] [starttime] - [starttime]"

Instead of the endtime the start time is displayed.
How can I fix this to show the subject, start time and end time?

Thanks in advance.

Risath



Anonymous
Replied On April 1, 2008 04:18 PM UTC

This is a defect that we will correct in our library. Until there is a release with this corrected, you can avoid the problem by handling the display item parsing event and do the parsing yourself.


this.scheduleControl1.ParseDisplayItem += new ParseDisplayItemEventHandler(scheduleControl1_ParseDisplayItem);

//....
void scheduleControl1_ParseDisplayItem(object sender, ParseDisplayItemEventArgs e)
{
if (e.Format == "[subject] [starttime] - [endtime]")
{
string s = string.Format("{0} ", e.Item.Subject);
s += e.Item.StartTime.ToString(this.scheduleControl1.Appearance.TimeFormat, this.scheduleControl1.Culture);
s += " " + e.Item.EndTime.ToString(this.scheduleControl1.Appearance.TimeFormat, this.scheduleControl1.Culture);
e.FormattedText = s;
e.Handled = true;
}
}




Risath
Replied On April 2, 2008 03:26 AM UTC

Thanks a lot Clay Burch.


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.

Warning Icon 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.Close Icon

;