>>You'd think by VFP version 7 that grids would be more customizable. How can I change the entry behavior of a grid? I want to make some columns inactive or disabled, and I want the cursor to move down not across when you press the enter key. You would think by version 7 you could see the columns in design mode and right click on each column to make customizations! TAB can go across as it already does. I am creating an order entry screen and one column is the order quantity. So I need to start in this column and have a way for them to type a quantity hit enter and keep rolling down the page.
>>
>>thanks
>>David
>
>You can use column textbox KeyPress event to intercept the Enter key and activate the cell in the next row.
For example, this code in columnN.textboxN.KeyPress() event will do what you want.
LPARAMETERS nKeyCode, nShiftAltCtrl
IF nKeyCode = 13
NODEFAULT
IF !EOF()
SKIP
THIS.PARENT.PARENT.REFRESH()
ENDIF
ENDIF
You can also do it with ActivateCell and DoScroll grid methods, or as Yuri says.
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro
"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison