foreach (ParaInfo para in PublicValue.PARAINFOS)
{
(dgvPara.Rows[index].Cells[2] as DataGridViewComboBoxCell).Items.Add(para.ParaName);
}
选择下拉列表选中内容后,用(dgvPara.Rows[i].Cells[2] as DataGridViewComboBoxCell).Value.ToString();或者dgvPara.Rows[i].Cells[2].Value.ToString();
都只能取到“”值;
dgvPara.Rows[i].Cells[2].Value.ToString(); 这个也为空的话,说明你的DGV里有一行是空值
检查一下dgv,默认是新建的时候,会有一行新增行(这行是空的),在属性里设置:AllowUserToAddRows 为False