Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个允许编辑单元格的 DataGridView。有没有一种方法可以让我以编程方式专注于指定的单元格以开始编辑?
使用设置当前单元格
dataGridView1.CurrentCell = dataGridView1.Rows[/*rowIndex*/].Cells[/*columnIndex*/];
然后开始编辑
dataGridView1.BeginEdit(true);