Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to create an Invisible column in Grid?
Message
 
 
À
25/10/1997 20:31:35
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00056702
Message ID:
00056853
Vues:
27
>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform