Followed is my code used to test recurrence exception functionality. I could never get it to work. The grid shows the appointment occurrences correctly. Hello World recurs exactly 4 time starting from today. However the first recurrence exception doesn't work. I wonder if you guys can provide us a simple code how to create an exception for occurrences.
List<
Appointment
> lstAppt = new List<
Appointment
>();
Appointment objAppt;
objAppt = new Appointment();
objAppt.Start = DateTime.Now;
objAppt.End = DateTime.Now.AddHours(1);
objAppt.Description = "Hello World";
objAppt.ID = 1;
objAppt.RecurrenceParentID = 1;
RecurrenceRange objRange = new RecurrenceRange();
objRange.Start = DateTime.Now;
objRange.RecursUntil = DateTime.Now.AddDays(4);//add 4 reccurence for today
DailyRecurrenceRule objDailyRecurrenceRule = new DailyRecurrenceRule(RecurrenceDay.EveryDay, objRange);
objDailyRecurrenceRule.Exceptions.Add(DateTime.Now);//add 1 exception for the first recurrence
objAppt.RecurrenceRule = objDailyRecurrenceRule.ToString();
lstAppt.Add(objAppt);
objAppt = new Appointment();
objAppt.Start = DateTime.Now.AddHours(3);
objAppt.End = DateTime.Now.AddHours(4);
objAppt.Description = "Good Bye";
objAppt.ID = 2;
objAppt.RecurrenceParentID = 2;
lstAppt.Add(objAppt);
RadScheduler1.DataSource = lstAppt;
RadScheduler1.DataBind();