Control Object Properties
Drag and Drop Grid
   
Description The following properties are associated with drag and drop functionality in grids:

'DraggedColumn Column where the drag started from.
'DraggedRow Row where the drag started from.
'DroppedOnColumn Column dropped on..
'DroppedOnRow Row dropped on.

When dragging off of a grid, the starting point must be a column or row header. If a column header is used and column swapping is enabled using the 'SwapEnabled property, then the drop target must be a control other than the grid itself. This is because dragging a column header within the grid is how columns are swapped.

Example:

1600 ! 1600 - Drag and drop rows from g1 (grid 1) to g2 (grid 2)
1610 ROW_DROP:
1620 LET R=G1'DRAGGEDROW; IF R<1 THEN RETURN
1630 LET G1'ROW=R
1640 READ DATA FROM G1'ROWDATA$ TO IOL=G1'LOADIOLIST$
1650 GRID DELETE G1,0,R
1660 LET R=MAX(1,MIN(G2'DROPPEDONROW,G2'ROWSHIGH))
1670 GRID ADD G2,0,R
1680 LET G2'ROWDATA$=REC(G2'LOADIOLIST$)
1690 RETURN

For more information, refer to the GRID Directive.