Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid Showing an Extra Record At The Bottom.
Message
 
À
07/01/1999 20:30:44
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00173852
Message ID:
00174037
Vues:
80
Hi Grant,

I'm guessing this behavior is by design to ensure the last record is visible.

As long as you can determine the number of rows appearing in the grid, you can prevent this behavior by setting the form's KeyPreview to .T. and adding code similar to that below to the Form's KeyPress Event:
LPARAMETERS nKeyCode, nShiftAltCtrl

Count to LastRow

if .f. and thisform.grdMyGrid.activerow = LastRow ;
	and nKeyCode = 24 
	
	* We're on the last record, and the down arrow was pressed
	* so cancel the keystroke.

	nodefault

endif
>No deleted records. Try this.
>Create a table with 2 field and add 8 records and Replace the 1st field with STR(recno())
>Create a form.
>In the data environment add the table.
>Create the grid.
>
>When you create the grid in the form designer go to properties of the grid and set the RecordSource to the table.
>ScrollBars = 0
>ColumnCount = 2
>After that Resize the grid to be a little bit larger than 8 Rows. (Count them).
>Run the form.
>At this moment You should see all the 8 records on the grid and a little bit extra below the 8th row.
>Go to the 8th row.
>Push the Down Arrow.
>You should see (I hope) the blank line.
>Please HELP.
kenweber
GCom2 Solutions
Microsoft Certified Professional

Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform