Question DataGridView Focus

prosys

Member
Joined
Aug 7, 2008
Messages
13
Programming Experience
Beginner
Hi All,
i am using DataGridView for Data binding. it works fine.
i wrote a coding retrieve current row's DATA when press enter key in DataGridView

it works fine,but when i pressed enter key datagridview focus is move to next row, so that it will retrieve the latest focus data, but i want data from the enter key press.

how i resolve this?

thanks for advance
 
It is suppose to move to the next row... Changes to a datarow fire when moving from the row to another; clicking enter triggers this.
 
Private Sub DataGridView1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs)
If e.KeyCode = Keys.Enter Then
e.SuppressKeyPress = True
endif
end sub
 
Back
Top