2011-04-07 87 views
1

我要改變每任命標題我有,而不是顯示應用程序的時間
我試圖InitAppointmentDisplayText事件,但它只是改變了應用程序XtraSchedule顯示自定義約會標題

的工具提示
private void schedulerControl1_InitAppointmentDisplayText(object sender, AppointmentDisplayTextEventArgs e) 
     { 
      e.Text = string.Format("Schedule: {0}, Time: {1}", e.Appointment.Description, e.Appointment.Start.ToShortTimeString()); 
      e.Description = string.Format("Schedule: {0}, Time: {1}", e.Appointment.Description, e.Appointment.Start.ToShortTimeString()); 
     } 

enter image description here

回答

3

您應該處理InitAppointmentDisplayText事件,也設置Scheduler.Views.MonthView特性如下圖所示:

schedulerControl1.Views.MonthView.AppointmentDisplayOptions.EndTimeVisibility = DevExpress.XtraScheduler.AppointmentTimeVisibility.Never; 

schedulerControl1.Views.MonthView.AppointmentDisplayOptions.StartTimeVisibility = DevExpress.XtraScheduler.AppointmentTimeVisibility.Never; 

schedulerControl1.Views.MonthView.AppointmentDisplayOptions.TimeDisplayType = DevExpress.XtraScheduler.AppointmentTimeDisplayType.Text; 

     private void schedulerControl1_InitAppointmentDisplayText(object sender, DevExpress.XtraScheduler.AppointmentDisplayTextEventArgs e) { 
      e.Text = "test"; 
     }   

UPDATE

請參考以下主題我們的文檔中學習如何實現自定義編輯表單:

How to: Create a Custom EditAppointment Form with Custom Fields

​​

+0

感謝它的工作,我想知道什麼是我必須處理的事件,以捕獲預約**雙擊**爲了使用自定義界面進行編輯,我嘗試了'EditAppointmentFormShowing'&EditRecurrentAppointmentFormShowing',但沒有任何幫助,我用'EditAppointmentFormShowing'來創建**新的約會**與自定義界面,但事件沒有觸發編輯! – 2011-04-07 11:15:30

+0

更新了我的答案... – 2011-04-07 13:39:55

+0

是否有任何屬性,我必須設置或更改之前,以便在雙擊該應用程序時觸發'ditRecurrentAppointmentFormShowing'? – 2011-04-07 13:50:30