我填充這樣的組合框。希望是空的。我該怎麼做?Combobox的第一個值應該是null
private void txtLoadname_DropDown(object sender, EventArgs e)
{
HashSet<string> LoadName = new HashSet<string>();
for (int i = 0; i < dataGridView1.Rows.Count - 1; i++)
{
LoadName.Add(dataGridView1.Rows[i].Cells["loadNameDataGridViewTextBoxColumn"].Value.ToString());
}
txtLoadname.DataSource = LoadName.ToList();
}
我爲什麼會問? – Vishal 2010-11-24 18:01:33