TAB or Enter key in DataGrid

Fiaolle

Member
Joined
Jun 14, 2006
Messages
8
Programming Experience
1-3
Hi
If I click on the new row in my DataGrid, I can see that I have a new row
with cells with NULL values. But if I Tab to the new row the same thing
doesn't happen, it seems like it isn't a new row. And I want to be able
to Tab to a new row. Can I raiseevent to event myGrid_Click so the same
thing happens as if a user clicks the new row. If I can do so, please tell
me how if I can't please tell me what to do instead. I have tried to change
the CurrentCell in the method Positionchanged for CurrencyManager, and than
I can Tab to the new row, but when I use Tab again I go back to the row
earlier.

Need help !!!

Thank's Fia

 
Hi
I have made my DataGrid move to the next cell on TAB and Enter (the code
below) and it
works fine, but when standing in the first cell on the new row (last row)
and pressing TAB or Enter the cursor moves to the second cell on the
PREVIOUS row and not the new row. Why? And if I MOUSE_CLICK in the first
cell on the new row, I can press TAB and it works fine. Is there a way I can
make pressing the TAB work like Mouse_Clicking the new row??

Protected Overrides Function ProcessCmdKey(ByRef msg As
System.Windows.Forms.Message, ByVal Keys As System.Windows.Forms.Keys) As
Boolean
If (msg.WParam.ToInt32() = CType(Keys.KeyCode.Enter, Integer)) Then
Keys.Send("{Tab}")
Return True
End If
Return MyBase.ProcessCmdKey(msg, Keys)
End Function

Please HELP!!!
Fia
 
Back
Top