dev lookupedit 和Windows ComboBox获取多列数据

Windows ComboBox获取多列数据

DataRowView data = (DataRowView)this.BindingContext[cmbHospId.DataSource].Current;

object ceshi = data["ceshi"];
string ceshi = data["ceshi"].ToString();

cmbHospId.DataSource 为控件的数据源,ceshi为数据源中的某一列

 dev lookupedit 获取多列数据

DataRow ss = cmbHospId.GetSelectedDataRow() as DataRow;

string ceshi = ss["ceshi"].ToString();
string ceshi 2 = ss[2].ToString();

2为数据源的第三列

posted on 2018-10-29 12:04  陪你葬忆拾荒  阅读(287)  评论(0编辑  收藏  举报