关于LookUpEdit绑定数据源和取值

首先在GridControl里在Repository中添加一个GridLookUpEdit 在设置DisPlayMember(界面显示字段)

然后在后台绑定数据

List<EntityBrand> entityBrand = client.GetBrandList();
this.repositoryItemLookUpEdit.DataSource = entityBrand;

然后在GridControl

将控件绑定的某一列上,设置FieldName

这就基本完成数据绑定了

数据获取部分

因为我绑定的时候就是绑定的一个实体类,所以我可以直接通过该实体类来获取。

猜你喜欢

转载自www.cnblogs.com/yourSixUncle/p/9899933.html