Hi Guys,
I am having trouble with a WebDayView where it is quite erratic in showing appointments. I have checked out the HTML source shown below and all my appointments are there but the display style on them is none and the positioning isn't there. My activity adding code is as follows:
Appointment appointment = new Appointment(this.WebScheduleInfo); // Configure the Appointment with the information in the data source appointment.Key = "activity_"+Context.Server.UrlEncode(activity["RoomName"].ToString()); appointment.Subject = activity["ActivityName"].ToString(); DateTime startDateTime = (DateTime)activity["StartTime"]; appointment.StartDateTime = new SmartDate(startDateTime.Year, startDateTime.Month, startDateTime.Day, startDateTime.Hour, startDateTime.Minute, 0); DateTime endDateTime = (DateTime)activity["EndTime"]; //appointment.EndDateTime = new SmartDate(endDateTime.Year, endDateTime.Month, endDateTime.Day, endDateTime.Hour, endDateTime.Minute, 0); appointment.Location = activity["RoomName"].ToString(); appointment.Style.BackColor = Color.FromArgb(105, 127, 177); appointment.Description = "Academic event"; appointment.Duration = endDateTime.Subtract(startDateTime); // Add the Appointment to the Activities list in the context ((IList)context.Activities).Add(appointment);
and a sample of the data is:
MN10007 Semb/1 1WN 3.11 20-24, 28-29 2008-02-12 11:15:00.000 2008-02-12 09:15:00.000MN10007 Sem/2 8W 2.21 20, 22, 24, 29, 31 2008-02-12 11:15:00.000 2008-02-12 10:15:00.000MN10007 Semd/1 1WN 3.11 20-24, 28-29 2008-02-12 13:15:00.000 2008-02-12 12:15:00.000MN10311 Lec 2W UN. HALL 18-24, 28-32 2008-02-12 19:15:00.000 2008-02-12 17:15:00.000
here is the html and display:
If anyone can give me help on this, it's driving me mad! I have asked for support help on it but haven't heard anything for a week on it.
Thanks in advance, Mike
hello, what do you mean by "erratic showing of appointments"?
thanks
Hi,
To anyone who might be having the same problem I have solved it!
The issue was that I wasn't making the appointment.key unique, this made them display fine in the week view but not in day view.
It's all working OK now.
Cheers, Mike