0
我在DataGridViewComboBoxCell中有一些項目,當窗體加載時我需要在該DataGridViewComboBoxCell中顯示特定項目。在DataGridViewComboBoxCell中獲取特定項目#
這裏是代碼 -
DataGridViewComboBoxCell cbc = new DataGridViewComboBoxCell();
foreach (String item in objectListBoxList[listboxNumber].GetItemInList())
{
cbc.Items.Add(item);
}
dataGridViewList[tableNumber].Rows[parameter.getRow()].Cells[1] = cbc;
我需要它是這樣的---
dataGridViewList[tableNumber].Rows[parameter.getRow()].Cells[1] = cbc.Items[1];