Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid and copy / paste
Message
De
22/11/1999 11:16:31
 
 
À
22/11/1999 11:07:20
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00293935
Message ID:
00293944
Vues:
21
Hi Francis,

This is not going to be easy. You are going to have to set up a command button on the parent container of the grid (page or form) to handle the pasting. You are also going to have to provide some means to "mark" each record in the grid you want to paste. You could do this by adding a logical field to the bound table or view and showing a checkbox in the grid. If the user checks a record via the checkbox, and then clicks on the paste button, you could SCAN throught he source table, look for True values, and INSERT INTO the table using the values of the source row. REPLACE the logical value with .F. to uncheck it and continue the SCAN. Now, refresh your grid and, viola, the new, pasted records will be there.

Watch out for primary keys. You don't want to "paste" these.


>Where can i find samples of how to use copy and paste in a grid.
>
>What i want to do is to be able to select a number of rows in a grid, to copy them in the cliboard and the paste them back in the grid.
>
>This would be usefull to duplicate rows in the grid.
>
>
>Thanks for a little help.
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform