SpreadJS Documentation
SheetMoved Event
GC.Spread.Sheets Namespace > Events type : SheetMoved Event
The sheet that triggered the event.
The sheet's name.
The previous sheet index.
The new sheet index.
Occurs after the user drags and moves the sheet.
Syntax
var instance; // Type: Events
instance.SheetMoved = function(sheet, sheetName, oldIndex, newIndex) { };
SheetMoved = function ( 
   sheet : Worksheet,
   sheetName : string,
   oldIndex : number,
   newIndex : number
) { };

Parameters

sheet
The sheet that triggered the event.
sheetName
The sheet's name.
oldIndex
The previous sheet index.
newIndex
The new sheet index.
Example
//This example uses the SheetMoved event.
window.onload = function(){
     var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"),{sheetCount:3});
     var activeSheet = spread.getActiveSheet();
     spread.bind(GC.Spread.Sheets.Events.SheetMoving, function (e, data) {
         alert(data.sheetName + '\n' +  'oldIndex: ' + data.oldIndex + '\n' +  'newIndex: ' + data.newIndex + '\n' +  'cancel: ' + data.cancel);
     });
     spread.bind(GC.Spread.Sheets.Events.SheetMoved, function (e, data) {
         alert(data.sheetName + '\n' +  'oldIndex: ' + data.oldIndex + '\n' +  'newIndex: ' + data.newIndex);
     });
}
See Also

Reference

Events type