int CIndex = e.ColumnIndex; if (e.RowIndex >= 0 && e.ColumnIndex >= 0) { DataGridViewComboBoxColumn combo = dataGridView1.Columns[e.ColumnIndex] as DataGridViewComboBoxColumn; if (combo != null) //如果该列是ComboBox列 { dataGridView1.BeginEdit(false); //结束该列的编辑状态 DataGridViewComboBoxEditingControl comboEdite = dataGridView1.EditingControl as DataGridViewComboBoxEditingControl; if (comboEdite != null) { comboEdite.DroppedDown = true; //展现下拉列表 } } DataGridViewTextBoxColumn textbox = dataGridView1.Columns[e.ColumnIndex] as DataGridViewTextBoxColumn; if (textbox != null) //如果该列是TextBox列 { dataGridView1.BeginEdit(true); //开始编辑状态 } }