Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Append blank with keypress in grid.
Message
De
06/10/2001 14:25:28
Ing. T.R.M. Pluym
Pluym Elektronics Bv
Hulst, Pays-Bas
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Append blank with keypress in grid.
Divers
Thread ID:
00565189
Message ID:
00565189
Vues:
61
Hi,

I like to us the insert key to add a blank line to a grid.

The first column i use is the 'quantity' column wich is bound to the
'quantity' field (N,8,2) of a table. Within the grid I use the keypress event of the textbox to detect the INS key is pressed. So far so good.
This is what is in the keypress event:

LPARAMETERS nKeyCode, nShiftAltCtrl

IF nKeyCode = 22
APPEND BLANK
REPLACE Quantity WITH 1
THIS.REFRESH()
ENDIF

The strange thing is, that not only the new added blank record is filled with the '1' but also in the current line (where i pushed the INS key) the quantity field is filled with '1' even there is another value displayed. I also tried:

IF nKeyCode = 22
REPLACE Quantity WITH This.Value
THIS.REFRESH()
APPEND BLANK
REPLACE Quantity WITH 1
THIS.REFRESH()
ENDIF

Same result, what am i doing wrong ?
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform