我想更改每个约会的标题,而不是显示应用的时间
我尝试了InitAppointmentDisplayText
事件,但它只更改了应用的工具提示
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());
}
答案 0 :(得分: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";
}
<强>更新强>
请参阅我们的文档中的以下主题,以了解如何实现自定义编辑表单:
How to: Create a Custom EditAppointment Form with Custom Fields