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

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

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

 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 = 
        }
原文地址:https://www.cnblogs.com/JarviseZhou/p/3593240.html