DataGrid - Moving between columns

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello
i'm writing a C# Window appliction and i'm using DataGrid as a table
i want the user to enter data in each column and by pressing the enter key to move to the next column
how can i write it
how do i write the event (pressing the enter key) and how can i move to the next column

thank you
 
thank you but i still didn't understand

i want the enter key press wll be an event
this is my eventhandler header
this.dataGrid1.KeyPress+=new System.Windows.Forms.KeyPressEventHandler(this.dataGrid1_KeyPress)

and how do i write the method, the datagrid doesn't react when i press any key (i tried to debug and i saw that nothing happens when i press any key

thnak you
 
If I understood your message, you meant to say that your event handler
doesn't get called when you press a key in the datagrid.
I guess that would be because the columnstyle handles it and the
datagrid itself doesn't get the event at all.
I don't know why the solution I referred you to won't be good enough:
when ENTER is pressed, it generates a TAB keypress.
 
Hello Ur
the main problem is that i don't know how do it
how does the header suppose to be
and how does the method suppose to be

i tried and still nothing..

if you can, plz write me an example....
thank you
 
Back
Top