SpreadJS Documentation
DragFillUndoAction Constructor
The drag fill sheet.
The drag fill extent information.
Represents a drag fill undo action to drag and fill a range on the sheet.
Syntax
var instance = new GcSpread.Sheets.UndoRedo.DragFillUndoAction(sheet, dragFillExtent);
function DragFillUndoAction( 
   sheet : Sheet,
   dragFillExtent : object
) : DragFillUndoAction;

Parameters

sheet
The drag fill sheet.
dragFillExtent
The drag fill extent information.
Example
This example fills a range.
//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);
activeSheet.setValue(10, 5, 1);
var srange = new GcSpread.Sheets.Range(10, 5, 1, 1);
var frange = new GcSpread.Sheets.Range(11, 5, 3, 1);
var dragFillExtent = { startRange: srange, fillRange: frange, autoFillType: GcSpread.Sheets.AutoFillType.FillSeries, fillDirection: GcSpread.Sheets.FillDirection.Down };
var action = new GcSpread.Sheets.UndoRedo.DragFillUndoAction(activeSheet, dragFillExtent);
activeSheet.doCommand(action);
    });

<input type="button" id="button1" value="button1"/>
Remarks

dragFillExtent - The drag fill extent information.

startRange {GcSpread.Sheets.Range} - Indicates the drag fill start range.
fillRange {GcSpread.Sheets.Range} - Indicates the drag fill end range.
autoFillType {GcSpread.Sheets.AutoFillType} - Indicates the type of the drag fill.
fillDirection {GcSpread.Sheets.FillDirection} - Indicates the drag fill direction.

See Also

Reference

DragFillUndoAction type

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.