# Drag and Drop Grid Properties

> Source: https://manual.pvxplus.com/control-object-properties/dragdropgrid

The following properties are associated with drag and drop functionality in ***Grids***:

|  |  |  |
| --- | --- | --- |
|  | **['DraggedColumn$](https://manual.pvxplus.com/control-object-properties/properties-list#Mark41)** | Column where the drag started from |
|  | **['DraggedRow](https://manual.pvxplus.com/control-object-properties/properties-list#Mark42)** | Row where the drag started from |
|  | **['DroppedOnColumn$](https://manual.pvxplus.com/control-object-properties/properties-list#Mark213)** | Column dropped on |
|  | **['DroppedOnRow](https://manual.pvxplus.com/control-object-properties/properties-list#Mark214)** | Row dropped on |

When dragging off 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](https://manual.pvxplus.com/properties/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:***

```
! Drag and drop rows from g1 (grid 1) to g2 (grid 2)
ROW_DROP:
     R=G1'DRAGGEDROW;
     if R<1 \
          then return
     G1'ROW=R
     read data from G1'ROWDATA$ to iol=G1'LOADIOLIST$
     grid delete G1,0,R
     R=max(1,min(G2'DROPPEDONROW,G2'ROWSHIGH))
     grid add G2,0,R
     G2'ROWDATA$=rec(G2'LOADIOLIST$)
     return
```

## See Also

[GRID Create/Control Grid](https://manual.pvxplus.com/directives/grid)
