这是我设置当前单元格的代码:
dvFromAlloc.CurrentCell = dvFromAlloc(1, 0)
这怎么不在load事件中工作,为什么它不起作用?
谢谢您的帮助
你试试这个代码
DataGridView1.CurrentCell = DataGridView1.Rows[1].Cells[0];
或验证此链接
DGV.Focus()DGV.CurrentCell = DGV.Rows(0).Cells(2)
设置当前单元格:
dvFromAlloc.CurrentCell = dvFromAlloc.Item(1, 5)
要么
dvFromAlloc.CurrentCell = dvFromAlloc.Item("ColumnName", 5)
您可以通过以下方式直接关注编辑:
dvFromAlloc.BeginEdit(true)