Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Append blank with keypress in grid.
Message
From
06/10/2001 14:25:28
Ing. T.R.M. Pluym
Pluym Elektronics Bv
Hulst, Netherlands
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Append blank with keypress in grid.
Miscellaneous
Thread ID:
00565189
Message ID:
00565189
Views:
60
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
Map
View

Click here to load this message in the networking platform