十年网站开发经验 + 多家企业客户 + 靠谱的建站团队
量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决
DataTable customerTable = new DataTable();
customerTable.Columns.Add("clsCustomerID", typeof(string)); //定义列类型
customerTable.Columns.Add("clsCustomerNM", typeof(string));
DataRow row= customerTable.NewRow(); //加一行
row["clsCustomerID"] = "01.2136";
row["clsCustomerNM"] = "MAXIS1";
customerTable.Rows.Add(row);
DataRow row1= customerTable.NewRow(); //加另一行
row1["clsCustomerID"] = "01.2255";
row1["clsCustomerNM"] = "VSC2_PRE_W1";
customerTable.Rows.Add(row1);
comboBox1.DataSource= customerTable; //设置datasource 和 显示和实际数据列
comboBox1.DisplayMember= "clsCustomerNM";
comboBox1.ValueMember= "clsCustomerID";