Moving in cells in datagrid problem!

  • Thread starter Thread starter Lars Netzel
  • Start date Start date
L

Lars Netzel

Hello!

I have made my application move to the next cell on TAB and Enter and it
works fine for me and all the other computer I 've tested on in the office.

When deploying at the customer.. suddenly have a strange problem. When
standing in the last cell on a row and pressing TAB och Enter the cursor
move to the SECOND cell on the next row and not the first cell. Why?

The only thing I have seen so far that's different in the customers
Enviroment is that he's got a different dpi setting for the screen but I
doubt that would effect anything in the functionality in the grids.

please help/
Lars Netzel
 
Hi,

Post some code

Ken
-------------------------
Hello!

I have made my application move to the next cell on TAB and Enter and it
works fine for me and all the other computer I 've tested on in the office.

When deploying at the customer.. suddenly have a strange problem. When
standing in the last cell on a row and pressing TAB och Enter the cursor
move to the SECOND cell on the next row and not the first cell. Why?

The only thing I have seen so far that's different in the customers
Enviroment is that he's got a different dpi setting for the screen but I
doubt that would effect anything in the functionality in the grids.

please help/
Lars Netzel
 
there's not really any code to post. except for this...

Protected Overrides Function ProcessCmdKey(ByRef msg As
System.Windows.Forms.Message, ByVal keyData As System.Windows.Forms.Keys) As
Boolean

Select Case msg.WParam.ToInt32()

Case 13 ' enter Key

SendKeys.Send("{TAB}")

Return True

End Select

Return MyBase.ProcessCmdKey(msg, keyData)

End Function

But that's only triggering the TAB on Enter... then I guess the TAB does the
rest in the DataGrid by default.. that's why I'm confused. On my computer
and many others it just changes row if you are in the last cell of a
datagrid pressing TAB (or Enter in this case) but on my customers computer
it goes to the SECOND cell... of the following row.

/Lars
 
Hi,

Dont use sendkeys to send a tab when you are on the add new row.


Ken
---------------------------
there's not really any code to post. except for this...

Protected Overrides Function ProcessCmdKey(ByRef msg As
System.Windows.Forms.Message, ByVal keyData As System.Windows.Forms.Keys) As
Boolean

Select Case msg.WParam.ToInt32()

Case 13 ' enter Key

SendKeys.Send("{TAB}")

Return True

End Select

Return MyBase.ProcessCmdKey(msg, keyData)

End Function

But that's only triggering the TAB on Enter... then I guess the TAB does the
rest in the DataGrid by default.. that's why I'm confused. On my computer
and many others it just changes row if you are in the last cell of a
datagrid pressing TAB (or Enter in this case) but on my customers computer
it goes to the SECOND cell... of the following row.

/Lars
 
Back
Top