Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can you drag and drop grid rows?
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00432251
Message ID:
00432318
Vues:
22
Do you know of any code examples? I have never done a drag and drop in a grid.

Brenda

>First of all, you will need additional field in the alias used by grid. This could be numeric field that will be used to order rows. Initial value of this field match to the recno() (record number) for each row. Alias should be indexed by that field. The implementation here is very depended on what you use as RecordSource of grid: cursor (result of SQL SELECT), view or table?

>Than you can organize drag&drop in grid. This is quite a bit of mess, because you will require to play a lot with grid properties and objects. I recommend you to build it manually handling MouseDown, MOuseMove and MouseUp events.

>Once you finished drag&drop part and know exactly which row where should be placed, just change numbers in the sorting field to re-order rows, than grid.refresh to show rows in new order.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform