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.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only