Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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.

Trust the Universe
Posted

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

Trust the Universe

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...