GcSpread.Sheets.UndoRedo Namespace > ColumnAutoFitUndoAction type : ColumnAutoFitUndoAction Constructor |
The following setting is available:
column.col | number type | The automatic fit column index. |
var instance = new GcSpread.Sheets.UndoRedo.ColumnAutoFitUndoAction(sheet, columns, rowHeader, autoFitType);
function ColumnAutoFitUndoAction( sheet : Sheet, columns : Array, rowHeader : boolean, autoFitType : AutoFitType ) : ColumnAutoFitUndoAction;
The following setting is available:
column.col | number type | The automatic fit column index. |
//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"/>