Controlling Grid Navigation

Max Peck

New member
Joined
Jan 14, 2013
Messages
2
Programming Experience
10+
Hey Guys,

Does anyone know how to control the default row/column navigation of the DataGridView component? I'm finding that after ending the edit on a cell that the default behavior is to move to the next column to the right on the current row. I'd like to move to the next row but same column, instead. I can't seem to find any property of the grid that allows me to control this. If I try to force the current cell anywhere between the time the cell value changes and the focus arrives in the cell to the right I wind up with recursion errors. (Not surprising). Is there a property somewhere that will enable me to identify the next cell to receive focus after a cell has been edited?

Thanks ...
 
Keyboard behaviour in DataGridView is that Tab key moves to next cell and Enter key moves to same column in next row, this is same whether you are editing a cell or just navigating around. Standard HCI.
 
Hey John,

Actually, this navigation (to the next cell) is the result of choosing from a combo-box column. I take it, then, that there's no way for me to fool the thing into navigating to the next row, eh? OK, not a huge deal. As I've said I have tried to intercept and control this behavior (trying to re-select the "current" cell somewhere else) in the enter event's of the next column, etc. I can generally jimmy the controls a bit but haven't been able to get away with this one. It is what it is, I guess.

Thanks.

-Max
 
I don't see that problem, when I test with a Combobox column the keyboard behaviour is the same here as with a Textbox column.
 
Back
Top Bottom