If you correctly understood that the cell should enter the editing mode as soon as it is pressed. This can be achieved by setting the EditMode DataGridView property to EditOnEnter . However, this leaves the text in the edit control, so if you do not want you to be able to use:
dataGridView1_CurrentCellChanged(object sender, EventArgs e) { dataGridView1.BeginEdit(false); }
Can you explain what you mean by adding a line dynamically?
source share