SpreadJS Documentation
ColumnResizeUndoAction Constructor
The sheet.
The resize columns; each item is an object.
column.firstCol number type The index of the first column in the contiguous selection.
column.lastCol number type The index of the last column in the contiguous selection.
The resized column's size.
Whether the column being resized is in the row header area.
Represents the undo actions for resizing a column on a sheet.
Syntax
var instance = new GcSpread.Sheets.UndoRedo.ColumnResizeUndoAction(sheet, columns, size, rowHeader);
function ColumnResizeUndoAction( 
   sheet : Sheet,
   columns : Array,
   size : number,
   rowHeader : boolean
) : ColumnResizeUndoAction;

Parameters

sheet
The sheet.
columns
The resize columns; each item is an object.
column.firstCol number type The index of the first column in the contiguous selection.
column.lastCol number type The index of the last column in the contiguous selection.
size
The resized column's size.
rowHeader
Whether the column being resized is in the row header area.
Example
This example resizes columns.
//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 () {
var columns = [ { firstCol: 3, lastCol: 5 } ];
spread.allowUndo(true);
var action = new GcSpread.Sheets.UndoRedo.ColumnResizeUndoAction(activeSheet, columns, 50, false);
activeSheet.doCommand(action);
    });

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

Reference

ColumnResizeUndoAction type

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.