SpreadJS Documentation
GC.Spread.Sheets.Tables Namespace / TableManager type / move Method
The table instance or the table name.
The new row index.
The new column index.
In This Topic
    move Method
    In This Topic
    Changes the table location.
    Syntax
    var instance = new GC.Spread.Sheets.Tables.TableManager(sheet);
    var value; // Type: any
    value = instance.move(table, row, column);
    function move( 
       table : undefined,
       row : number,
       column : number
    ) : any;

    Parameters

    table
    The table instance or the table name.
    row
    The new row index.
    column
    The new column index.
    Example
    This example moves the table.
    var activeSheet = spread.getActiveSheet();
    
    activeSheet.tables.add("Table1", 0, 0, 3, 3, GC.Spread.Sheets.Tables.TableThemes.dark1);
    activeSheet.getCell(0,0).text("Name");
    activeSheet.getCell(0,1).text("Value");
    activeSheet.getCell(0,2).text("T/F");
    activeSheet.getCell(1,0).text("AW");
    activeSheet.getCell(1,1).text("5");
    activeSheet.getCell(1,2).text("T");
    
    $("#button1").click(function () {
    var table  = activeSheet.tables.findByName("Table1");
    alert(table);
    activeSheet.tables.move(table, 3, 3);
        });
    activeSheet.tables.add("Table1", 0, 0, 3, 3, GC.Spread.Sheets.Tables.TableThemes.dark1);
    activeSheet.getCell(0,0).text("Name");
    activeSheet.getCell(0,1).text("Value");
    activeSheet.getCell(0,2).text("T/F");
    activeSheet.getCell(1,0).text("AW");
    activeSheet.getCell(1,1).text("5");
    activeSheet.getCell(1,2).text("T");
    
    $("#button1").click(function () {
    var table  = activeSheet.tables.find(0,0);
    activeSheet.tables.move(table, 3, 3);
        });
    See Also