我填充这样的组合框。希望是空的。我该怎么做?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