ProvideX V8.20 > Language Reference > 7. Control Object Properties
729
Drag and Drop (Grid)
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; LET G2'ROW=R
1680
LET G2'ROWDATA$=REC(G2'LOADIOLIST$)
1690
RETURN
For more information, refer to the GRID Directive, p.142.
Loading/Accessing by Row (Grid)
The following properties are used to load and access a grid by row:
'LoadList$
Lists column names in the order they appear physically in the grid.
'LoadIOLIST$$
Same list of variables as 'LoadList$, but in compiled IOList
format.
'RowData$
Returns or sets a complete row of data corresponding to the
names defined in the 'LoadList$. Each cell value is separated by
the defined column separator character, 'Sep$.
'LoadList$ returns a list of column names in the order in which they physically
appear within the grid object. When a grid is defined using FMT= in the GRID
directive, or columns names are assigned to columns in a grid, 'LoadList$ returns a
list of those column names in their current display order. The compiled version,
'LoadIOLIST$ simplifies the loading of grid rows from direct file contents or other
IOList-based items; e.g.,
myGrid.ctl'RowData$=rec(myGrid.ctl'LoadIOLIST$)
GRID LOAD myGrid.ctl,1,row,rec(myGrid.ctl'LoadIOLIST$)