天天看点

c#中combox绑定datatable数据源

combox绑定datatable数据源

string _str2 = string.Empty;

_str1 = string.Format("select distinct p_o, p_id from [QC_Angel] where Product='{0}' ",textBox1.Text.Trim());

comboBox1.DataSource = _dt;

comboBox1.ValueMember = "p_id"; //指定哪个栏位,有p_o, p_id