Well, I suppose you could put something in the Keypress method, to kill the Tab key or whatever key you need to kill. The code might look like this:
if nKeyCode = 9
nodefault
endif
But what about when they fill the field? VFP will automatically move to the next column and will wrap around, so the above code would not work. And if they drag the columns around and reposition them, that's going to add to the problem.
Interesting question - don't think I've ever needed to do this before.
Out of curiosity, why are you wanting to do this? The wrap around feature of VFP grids (and the browse) are prety handy, usually.
>Hi all,
>
>I've got a grid on an order entry form to handle the order's detail lines. Let's say there are five columns in the grid. I want to prevent them from wrapping around (moving from column 1 to column 5, or moving from column 5 to column 1). I want them to have to move to the right from column 1 and to the left from column 5. I'm assuming I'd have to put something in the Valid method for each of those columns (correct?), but what? Something to block tab/shift-tab or the right-arrow/left-arrow? How do I prevent users from leaving a grid column in certain directions, or force them to leave in the direction I choose?
>
>Thanks much!
>
>John