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为数据源的第三列
原文地址:https://www.cnblogs.com/BigBigDream/p/9869786.html
时间: 2024-10-14 22:48:57