My Datagridview has only two rows. I have set allowusertoaddnewrow = false. I am filling rows in datagridview from database. I want to transfer its value in a textbox on KeyDown Event by pressing Enter Key. When I Press Enter key in datagridview to select the contents of first row, the datagridview.currentrow.index is returned 1. In the same way when I select the second row and press Enter Key then same happens here, means it also returns the datagridview.currentrow.index = 1. Is there any concept so that I can deal with this problem.
What I have tried:
RowIndx = Me.DataGridView1.CurrentRow.Index