Jump to content
Xtreme .Net Talk

DataGrid KeyPress & KeyDown Events


Recommended Posts

Posted

Has anyone worked with Keypress and/or KeyDown Events? I'm trying to use these events with a DataGrid. I would like to arrow up/down until I get to the row I want and select the row by using one of the above events. BUT I'm having trouble!

 

It's seems like you only can use the KeyDown Event when you have the whole row selected and not just one cell in a row. SO to avoid this problem I tried a DataGrid.LocationChange event to select the whole row when arrowing down or up. I figured you could just get the Current Row by getting the row via CurrentRowIndex or CurrentCell and then doing a DataGrid.Select(CurrentRow) when changing the Location....but I can't get it to work...any suggestions?

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...