Datagridview enter key and row index

feurich

Centurion
Joined
Oct 21, 2003
Messages
170
Location
Holland
Hi There,

Is there a way af determining which row is selected in the DataGridView_KeyDown event?

I need to know this because the first row is a search row and the other rows are display rows.
So if the user want to search he/she adds information in the first row and hits enter to search the database.

OK, Hope this is clear enough.
 
Found it!

You can access the selectedRowIndex with the following:
DataGridView1.CurrentRow.Index

Sometimes it is so simple :D
Sometimes you look for something that is right in front of your nose.

Thanks for the patience.

hciruef
 
Back
Top