Information générale
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Append blank with keypress in grid.
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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement