Reputation: 10723
I'm reading the appointments form a datatable. Here is my code:
List<MyClass> myObjects = (from e in myEntities.Mytable where
e.DateFrom >= schedulerInfo.ViewStart &&
e.DateTo <= schedulerInfo.ViewEnd
select e).ToList();
List<Appointment> appointments = new List<Appointment>(myObjects.Count);
foreach (MyClass e in myObjects) {
Appointment a = new Appointment();
a.ID = e.ID;
a.Subject = e.Description;
a.Start = e.DateFrom;
a.End = e.DateTo;
a.BackColor = System.Drawing.Color.Yellow;
appointments.Add(a);
and when I run it, it isn't yellow!
Upvotes: 0
Views: 3500
Reputation: 1989
In order to change the color of an appointment in the RadScheduler you will have to subscribe to the OnAppointmentDataBound event. As can be seen in this documentation article, all you have to do is grab the current appointment objects from e.Appointment
and define the BackColor (and other available properties) and you should be all set!
Upvotes: 2