标签:
this.ComboBox1.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
this.ComboBox1.AutoCompleteSource = AutoCompleteSource.ListItems;
this.ComboBox1.DropDownWidth = 400;
this.ComboBox1.DropDownHeight = 400;
string sql = " sql语句 ";
DataTable dt = LinQBaseDao.Query(sql).Tables[0];
DataRow dr = dt.NewRow();
dr["Contract_No"] = "0";
dr["Contract_Name"] = "";
dt.Rows.InsertAt(dr, 0);
ComboBox1.DataSource = dt;
ComboBox1.ValueMember = "Contract_No";
ComboBox1.DisplayMember = "Contract_Name";
标签:
原文地址:http://www.cnblogs.com/yangdunqin/p/4222321.html