首页 > 其他 > 详细

GridView----CustomRowCellEdit 使用注意事项

时间:2014-03-11 15:23:13      阅读:3716      评论:0      收藏:0      [点我收藏+]

当你在Grid和TreeList中,需要对不同的行中的某一个单元格(Cell)提供特定的RepositoryItem时,使用CustomRowCellEdit 绝对能胜任,

但在使用时千万要注意了:“一定要用参数(CustomRowCellEditEventArgs e)e.RowHandle来获取数据,不然会应用到每一行”。

bubuko.com,布布扣
 void GridView1_CustomRowCellEdit(object sender, DevExpress.XtraGrid.Views.Grid.CustomRowCellEditEventArgs e)
        {
            if (e.Column.FieldName != "FeildName1") return;

            var obj = GridView1.GetRow(e.RowHandle) as A;   
var rptNew= new RepositoryItem(){};        
rptNew.Properties.DataSource=GetDataBy(obj);            e.RepositoryItem = 
        }
bubuko.com,布布扣

GridView----CustomRowCellEdit 使用注意事项,布布扣,bubuko.com

GridView----CustomRowCellEdit 使用注意事项

原文:http://www.cnblogs.com/JarviseZhou/p/3593240.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!