Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Double-click DataGridView row?

Tags:

I am using vb.net and DataGridView on a winform.

When a user double-clicks on a row I want to do something with this row. But how can I know whether user clicked on a row or just anywhere in the grid? If I use DataGridView.CurrentRow then if a row is selected and user clicked anywhere on the grid the current row will show the selected and not where the user clicked (which in this case would be not on a row and I would want to ignore it).