Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to create an Invisible column in Grid?
Message
From
27/10/1997 14:21:22
 
 
To
25/10/1997 20:31:35
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00056702
Message ID:
00056853
Views:
21
>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform