>Hi all,
>
>I'll like to create a non visible column on the most right side of my grid. The purpose is to detect a keypress of 'ENTER' and if the user is in add mode, auto insert a new record in the grid. Have tried seeting the column width to 0 and visible to .F., but I can still see an empty column. Can this be done?
>
>Thanks for your help.
>
>Regards,
>
>Farouk Yew Abdullah.
Farouk,
If what I think you are trying to do is right, you could do the same thing by using the grid's BeforeRowColChange event. For example, I put the following code in there:
LPARAMETERS nColIndex
LOCAL nCurrRec
*--check for Enter key press in the last column of the grid. In this example there are only 2 columns
IF nColIndex = 2 AND LASTKEY()=13
IF RECNO() = RECCOUNT()
APPEND BLANK
ENDIF
KEYBOARD '{DNARROW}'
ENDIF
It works for me so try it!
HTH
John.
It's "my" world. You're just living in it.