Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adding New Records In A Grid
Message
De
30/06/1998 14:36:47
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Adding New Records In A Grid
Divers
Thread ID:
00113051
Message ID:
00113051
Vues:
50
I'm trying to add new records in a grid using the down arrow. I have put the following code in the KeyPress method of my Grid1.Column1.TextBox

nKeyCode = InKey()
If nKeyCode = 24
Insert Into GridTable(parent_id, otherparent_id) Values (Parent.parent_id, OtherParent.otherparent_id)
ThisForm.Refresh
EndIf

A new record is added to the GridTable but the parent_id fields are not entered therefore the relationship isn't preserved. How can I get a new record to be added with the apporpriate parent_id's using the down arrow? When I use similar coding with an add button I have no problems. BTW I do have the AddNew Method of the grid set to true. Am I not using the KeyPress method correctly?

TIA

--lincoln
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform