>Hello All,
>
>I would like to able to re-position records in a grid using listbox moverbar style functionality. Can anyone point the way to a methodology?
>
>TIA.
>
>Herb Ellerbock
>Customized Computer Systems
Hi Herb,
Just curious, what is your scenario for repositioning records? What do you need it for? Is it some kind of scheduling form? How many records could be involved in repositioning?
In general it can be done by either physical repositioning the records, or changing their order in the index. For physical repositioning you would need SCATTER/GATHER and INSERT command (that requires the exclusive table use). Or, you can change the record index by having some extra indexed field and changing the value in it. The repositioning can be done with GridHitTest() method, Right Click functionality or Drag&Drop.
Could you use the actual listbox imitating the grid instead, and then change the index field in the table according to their new order in the listbox? Kind of syncronyzing two things.
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro
"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison