SpreadJS Documentation
DragDropExtent Constructor
The source row index for the drag drop.
The source column index for the drag drop.
The destination row index for the drag drop.
The destination column index for the drag drop.
The row count for the drag drop.
The column count for the drag drop.
Represents a drag drop action extent that supports drag and drop on the sheet.
Syntax
var instance = new GcSpread.Sheets.UndoRedo.DragDropExtent(fromRow, fromColumn, toRow, toColumn, rowCount, columnCount);
function DragDropExtent( 
   fromRow : number,
   fromColumn : number,
   toRow : number,
   toColumn : number,
   rowCount : number,
   columnCount : number
) : DragDropExtent;

Parameters

fromRow
The source row index for the drag drop.
fromColumn
The source column index for the drag drop.
toRow
The destination row index for the drag drop.
toColumn
The destination column index for the drag drop.
rowCount
The row count for the drag drop.
columnCount
The column count for the drag drop.
Example
This example uses the drag drop action.
//Add data
for (var col = 1; col < 6; col++) {
    for (var row = 2; row < 11; row++) {
        activeSheet.setValue(row, col, row + col);
    }
}

$("#button1").click(function () {
spread.allowUndo(true);
var dd = new GcSpread.Sheets.UndoRedo.DragDropExtent(2, 1, 12, 2, 2, 2);
var action = new GcSpread.Sheets.UndoRedo.DragDropUndoAction(activeSheet, dd, true, false, GcSpread.Sheets.ClipboardPasteOptions.Values);
activeSheet.doCommand(action);
    });

<input type="button" id="button1" value="button1"/>
See Also

Reference

DragDropExtent type

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.