DevExpress控件使用交流,DevExpress中国社区 售前咨询
当前位置: 首页 > 开发资源 » 示例代码 » 在DevExpress XtraScheduler中可以使用XPO么?

在DevExpress XtraScheduler中可以使用XPO么?

作者:huhm   来源:本站   浏览:Loading...次   发布时间:2012-03-01   评论:0条

可以使用的,具体步骤如下:

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控件中文网 [http://www.devexpresscn.com/]
本文地址:http://www.devexpresscn.com/DevExpress-Resources/Demo-53.html

评论列表

暂无评论

请谈谈你的看法 请使用IE或者Firefox浏览器,暂不支持Chrome!

昵称 不填则默认为游客评论

DevExpress DXperience DXv2 v12

DevExpress DXperience 下载 download

DevExpress购买、价格、授权

慧都控件网为DevExpress界面控件的中国地区唯一正式授权经销商,正版控件销售公司,授权代理商,经销商及合作伙伴。

电话:400-700-1020
        023-66090381

邮箱:sales@evget.com

>>如何选择正规控件购买渠道