Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Mover functionality in grid
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00026191
Message ID:
00026439
Views:
25
>>Hi all,
>>
>>Has anyone figured out a way to implement the List Mover functionality in a grid. I'd like to give my users the ability to edit fields directly in the grid and at the same time be able to change the display order of rows through some kind of drag and drop.
>>
>>Any suggestions?
>>
>in the afterrowcolumnchange event put the code in to do the following
>
>check if shift key pressed (lparameters)
>if not return
>if so then check to see if row changed (compare to stored property)
>if so then reorder the source of the grid and refresh the grid
> (if table/cursor easiest way is to have a order field, (candidate index) and exchange the values of the field between the two records
> if array swap values in array etc
>
>if so then check to see if column changed (compare to stored property)
>if so then swap the controlsource for the two columns and requery the grid
>
>This is some complex coding and needs to be debugged but you get the idea.
>Once done save as a class and base your grids on it and all you grids will then have mover functionality. You may wish to use the control and not the shift key.

OK, if I understand you correctly, your suggesting use of normal navigation with the shift key down to indicate desire to move; that I can handle, with your pseudocode above. I'm not sure I see how to accomplish same with a control--for example a command button embedded in the column. How can I tell what row the control is dropped on; or am I missing the point entirely?
Ray Roper
Previous
Reply
Map
View

Click here to load this message in the networking platform