Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How drag and drop records in a grid?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00779829
Message ID:
00779921
Vues:
10
Unlike dragging columns, there is no built-in functionality in VFP grids for dragging rows. You have to write your own drag/drop functionality. I think it is not a trivial exercise in a grid. I hope you have an awfully good reason to need such functionality. It seems to me that indices would either take care of, or destroy the effects of, most such manipulations.

Speaking only for myself, I find it hard to imagine when I would want to present data to the user in unindexed raw record order.

If there is not too much data, especially column-wise, you might consider using a listbox which will allow you to use that sort of functionality much more easily. But then, the mover bars can only be used if the rowsource is 0 or 1 ('none' or 'value').

Alan

>Hi,
>
>My problem is not about replacement. I don’t know which method(s) in the grid will help me to do the drag and drop for records (I can drag and drop columns in a grid very easily).
>
>Thank you,
>Ali
>
>
>>>Hi Everybody,
>>>
>>>I want to switch the place of two records in a grid in the following way:
>>>
>>>I first drag the source record. Then, when I drop the pointer onto the other record, the content of the records will be switched. Just like what we can do with columns in a grid.
>>>
>>>Do you have any clue for me?
>>>
>>>Happy Easter,
>>>Thank you,
>>>Ali
>>
>>The simplest way might be just to scatter to two different arrays (aFrom and aTo), also saving the record no's, then goto each record and do gathers.
>>
>>Of course, if you are using an index, it would seem like a fairly pointless exercise.
>>
>>Alan
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform