General information
Category:
Forms & Form designer
Title:
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 ?
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only