Stop Datagridview from taking its own action on Return Keypress
I have a winform datagridview and it forces the user to select by rows rather then cells.
I want it to tak开发者_StackOverflow中文版e the currentrow and display the information it has in another winform.
However when the user presses enter it moves to the next row and then runs the keypress event, why is it doing this and how can i get it to run before it changes the selected row?
try creating your class that inherits DataGridView and overridint method
protected override bool ProcessCmdKey( ref Message msg, Keys keyData )
int the method body check if the key is enter and than just do nothing and return true
Best Regards,
Iordan
精彩评论