I wonder about 2 things:
1/ How do I force in the code the cursor (to select or give focus) to the first row in my datagrid. when I do the method: datagrid1.focus() it doesn t select my datagrid it doesn t do anything.
2/ I want to trap the event of selecting the datagrid in my form. the code bellow doesn t doesn t work:
Datagrid1_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles DataGrid1.KeyUp
If e.KeyData = Keys.Enter Then func2()
and when I remove the condition
If e.KeyData = Keys.Enter The code executes for all the keys and not only for Enter key
P.S: I don t have a problem with the mouse events, working fine, but only with the Enter key on keyboard
Thanks Folks.