I had tried that too. Turns out (again) I need to provide more details about what I am trying to do...
The code that I need to execute needs to advance the currently selected cell by 2 rows (instead of the standard 1 row) when the user makes a change to a cell and then presses ENTER. Here's a simplified example of what I am talking about. I will put my code in CellEndEdit(), like you suggested:
Sub DataGrid_CellEndEdit()
Dim CurCol as Short = DataGrid.SelectedCells(0).ColIndex
Dim CurRow as Short = DataGrid.SelectedCells(0).RowIndex
CurRow +=2
'This has no effect when called from this event!
DataGrid.Item(CurCol, CurRow).Selected = True
End Sub
Try and see if it works for you. The last line has no effect for me.
I know the next thing you are going to tell me to try is to put the code under the CellValidating() event. Unfortunately, that caused a stack fault due to an infinite loop. Changing the current cell in the CellValidating() event causes CellValidating() to be called again, which changes the cell, which causes CellValidating() to be called, which changes the cell, etc. etc.
I suppose there is some way I could prevent the recursion...let me think about it...in the meantime, if you have any good ideas let me know...
I appreciate your help...