DEV LookUpEdit 使用方法
public class field { public string Name { get; set; } public string Explain { get; set; } } List<field> list = new List<field>(); private void simpleButton1_Click(object sender, EventArgs e) { lueList.Properties.DataSource = list; //设置数据源 lueList 为LookUpEdit 控件 } private void lueList_EditValueChanged(object sender, EventArgs e) { field f = (field)lueList.EditValue; //获取选中的值 }
未选中时显示的值:Properties.NullText
选中时显示的值:Properties.DisplayMember
Properties.ValueMember 为空时(objct)lueList.EditValue
返回数据行,指定列时 返回列值。