可以使用的,具体步骤如下:
1. 首先创建XPO事件及资源数据映射类
2. 绑定数据到XtraScheduler中,如:
schedulerStorage1.Appointments.DataSource = this.xpCollection1;
schedulerStorage1.Appointments.Mappings.AllDay = "AllDay";
schedulerStorage1.Appointments.Mappings.Description = "Description";
schedulerStorage1.Appointments.Mappings.End = "Finish";
3. 在OnAppointmentsChanged等事件中修改数据,代码如下
private void OnAppointmentsChanged(object sender, PersistentObjectsEventArgs e) {
foreach(Appointment apt in e.Objects) {
XPBaseObject o = apt.GetSourceObject((SchedulerStorage)sender) as XPBaseObject;
if(o != null)
o.Save();
}
}
欢迎任何形式的转载,但请务必注明出处,尊重他人劳动成果
转载请注明:文章转载自:DevExpress控件中文网 [https://www.devexpresscn.com/]
本文地址:https://www.devexpresscn.com/post/153.html