SpreadJS Documentation
ColumnAutoFitUndoAction Constructor
The sheet.
The resized columns; each item is an object.

The following setting is available:

column.col number type The automatic fit column index.
Determines whether the resized columns are in the row header area.
Determines whether the auto-fit action includes the header text.
Represents the undo actions for automatically resizing a column in a sheet.
Syntax
var instance = new GcSpread.Sheets.UndoRedo.ColumnAutoFitUndoAction(sheet, columns, rowHeader, autoFitType);
function ColumnAutoFitUndoAction( 
   sheet : Sheet,
   columns : Array,
   rowHeader : boolean,
   autoFitType : AutoFitType
) : ColumnAutoFitUndoAction;

Parameters

sheet
The sheet.
columns
The resized columns; each item is an object.

The following setting is available:

column.col number type The automatic fit column index.
rowHeader
Determines whether the resized columns are in the row header area.
autoFitType
Determines whether the auto-fit action includes the header text.
Example
This example automatically resizes the column.
//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 = [ { col: 3 } ];
spread.allowUndo(true);
var action = new GcSpread.Sheets.UndoRedo.ColumnAutoFitUndoAction(activeSheet, columns, false, GcSpread.Sheets.AutoFitType.Cell);
activeSheet.doCommand(action);
    });

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

Reference

ColumnAutoFitUndoAction type

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.