DataGridView - Can focus be placed on the blank row with the (*) using code?

為{幸葍}努か 提交于 2019-12-25 01:33:15

问题


On a data grid view there is a blank row with a (*) in it that allows the user to insert a new row of data.

Is there a way to put focus on that row using code even though the data grid view has many rows already loaded in it?


回答1:


dgv2.CurrentCell = dgv2(0, dgv2.Rows.Count - 1)


来源:https://stackoverflow.com/questions/10641749/datagridview-can-focus-be-placed-on-the-blank-row-with-the-using-code

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!