Spread.Sheets Documentation
resizeColumn Field
Represents the command used to resize the column on a worksheet.
* The command has a boolean field canUndo that indicates whether the command supports undo and redo operations, and an execute method that performs an execute or undo operation.
* The arguments of the execute method are as follows.
context {GC.Spread.Sheets.Workbook} The context of the operation.
options {Object} The options of the operation.
* options.sheetName {string} The sheet name.
* options.columns {Array} The resize columns; each item is an object which has firstCol and lastCol.
* options.size {number} The size of the column that is being resized.
* options.rowHeader {boolean} Whether the column being resized is in the row header area.
isUndo {boolean} true if this is an undo operation; otherwise, false.
Syntax
var value; // Type: resizeColumn
value = GC.Spread.Sheets.Commands.resizeColumn;
var resizeColumn : resizeColumn;
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.options.allowUndo = true;
spread.commandManager().execute({cmd: "resizeColumn", sheetName: "Sheet1", columns:columns, value: 50, isRowHeader: false});
    });

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

Reference

Commands type

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.