SpreadJS Documentation
DragDropUndoAction Constructor
The sheet to drag and drop.
The drag drop extent information.
If set to true copy; otherwise, false means to cut.
If set to true inserts the drag data in the drop row or column.
Indicates the content type to drag and drop.
Represents a drag drop undo action used to drag a range and drop it onto another range on the sheet.
Syntax
var instance = new GcSpread.Sheets.UndoRedo.DragDropUndoAction(sheet, dragMoveExtent, copy, insert, option);
function DragDropUndoAction( 
   sheet : Sheet,
   dragMoveExtent : DragDropExtent,
   copy : boolean,
   insert : boolean,
   option : CopyToOption
) : DragDropUndoAction;

Parameters

sheet
The sheet to drag and drop.
dragMoveExtent
The drag drop extent information.
copy
If set to true copy; otherwise, false means to cut.
insert
If set to true inserts the drag data in the drop row or column.
option
Indicates the content type to drag and 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

DragDropUndoAction type

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.