天天看點

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