Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Inserting a record into a grid
Message
De
10/01/2003 14:41:02
Jorge Haro
Independent Consultant
Juarez, Mexique
 
 
À
07/01/2003 12:25:34
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00738883
Message ID:
00740455
Vues:
21
Hi Steven

Assuming you are positioned in the record where you wish to insert ...
select mytable
local lnKey
lnKey = mytable.nKey
replace all nKey with nKey + 1 for nKey >= lnKey
insert into mytable(nKey,cOtherValue) values(lnKey, 'SOME DATA')
Something else that I like to do in this scenario is put a couple of buttons beside the grid, that allow the user to move a record up or down
by swapping the key values between two records.

>Hi,
>
>To insert a record into a grid, between two records, I found it next to impossible. After many hours of work, I found that I had to delete all index tabs, then insert the record, and then re-create the indexes. This is very cumbersome, and dangerous.
>
>Any easier solutions, anyone ?
>
>Regards,
>
>Steve.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform