Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adding a new line in a grid
Message
De
24/11/2004 15:07:56
 
 
À
24/11/2004 14:41:20
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
00964413
Message ID:
00964492
Vues:
20
This message has been marked as the solution to the initial question of the thread.
I just tested it and this works:
SELE childfile
SET ORDER TO TAG lastname
SELE parentfile
SET RELATION TO lastname INTO childfile
*The below code is in the keypress of the last control in the child grid
PROCEDURE text1.KeyPress
	LPARAMETERS nKeyCode, nShiftAltCtrl
	IF (NKEYCODE=13)
		NODEFAULT
		SELE childfile
		SKIP
		IF EOF('childfile') .or. childfile.lastname <> parentfile.lastname
			APPEND BLANK
			REPLACE childfile.lastname WITH parentfile.lastname
		ENDIF
		KEYBOARD '{TAB}'
		KEYBOARD '{DNARROW}'
	ENDIF
ENDPROC
>eof() will not work because the table is in a relation with the parent table so it is not showing all records. The bottom grid row is not the last record in the table.
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform