SpreadJS Documentation
LeftColumnChanged Event
The sheet that triggered the event.
The sheet's name.
The old left column index.
The new left column index.
Occurs when the left column changes.
Syntax
var instance; // Type: Events
instance.LeftColumnChanged = function(sheet, sheetName, oldLeftCol, newLeftCol) { };
LeftColumnChanged = function ( 
   sheet : Sheet,
   sheetName : string,
   oldLeftCol : number,
   newLeftCol : number
) { };

Parameters

sheet
The sheet that triggered the event.
sheetName
The sheet's name.
oldLeftCol
The old left column index.
newLeftCol
The new left column index.
Example
This example synchronizes vertical and horizontal scrolling for sheet 1 and sheet 2.
 var sheet1 = spread.getSheet(0),
  sheet2 = spread.getSheet(1);

sheet1.bind(GcSpread.Sheets.Events.TopRowChanged, function (sender, args) {
    //Set the displayed top row of sheet1 to sheet2 (vertical scroll synchronization).
    sheet2.showRow(args.newTopRow, GcSpread.Sheets.VerticalPosition.top);
});

sheet1.bind(GcSpread.Sheets.Events.LeftColumnChanged, function (sender, args) {
    //Set the displayed left column of sheet1 to sheet2 (Horizontal scroll synchronization).
    sheet2.showColumn(args.newLeftCol, GcSpread.Sheets.HorizontalPosition.left);
});
See Also

Reference

Events type

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.