0
我正在閱讀約會形式的數據表。這裏是我的代碼:不同顏色的Telerik調度程序約會
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);
當我運行它,它不是黃色!
但我的OnAppointmentDataBound事件永遠不會被調用。 –
你如何綁定到RadScheduler?另外,您是通過標記還是通過在代碼隱藏中添加事件處理程序來訂閱OnAppoitnmentDataBound事件? – carlbergenhem
實際上,如果使用Web服務來填充RadScheduler,AppointmentDataBound不會觸發。我應該使用OnClientAppointmentDataBound來代替。 –