Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid Showing an Extra Record At The Bottom.
Message
De
08/01/1999 11:53:09
 
 
À
07/01/1999 18:39:40
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00173852
Message ID:
00174066
Vues:
34
>Hi. I have a grid, that has a fixed qty of lines. All of them are visible on the screen. When you select the last line and then press Arrow Down Key , the records move up and you see a blank line there.
>How to Stop That?

Good morning, Grant,

About 5 seconds after I left last night, I figured it out.

The behavior you are seeing is native VFP grid behavior. The empty row is available in the event your .AllowAddNew so the new record has a place to go.

To eliminate the appearance of this row, you will need to trap, control and eliminate the down arrow (and I think the page down) keypresses.

You cannot do this in the grid itself since it has no keypress event, nor does the grid column. The only place it can be done is in each control in every column. So in the keypress event of each control in the grid, add,
*-- Text1.Keypress()

#define KDNARROW  24
#define BOTTOMROW  8
WITH this.parent.parent && the grid
    IF .activeRow = BOTTOMROW .AND. nKeyCode = KDNARROW
       NODEFAULT
    ENDIF
ENDWITH
That should do it.

Regards,
Jim Edgar
Jurix Data Corporation
jmedgar@yahoo.com

No trees were destroyed in sending this message. However, a large number of electrons were diverted from their ordinary activities and terribly inconvenienced.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform