I have written a function moveRows(startRow, endRow, targetRow) that moves the rows of a spreadsheet and adjusts the underlying data. Now, I would like an easy method for the user to invoke this action, using drag and drop.
For example, let's say the user makes a selection with the mouse, like B11:G15. I then want the user to be able to drag, or Ctrl+Drag (or whatever), the selection and drop it on a cell in a different row, say A2. As a result of this action, I would call moveRows(startRow : 11, EndRow: 15, TargetRow: 2) which would perform the actual manipulation of the spreadsheet and underlying data.
How can I enable the drag/drop of the selected range?