SpreadJS Documentation
SheetMoving Event
GC.Spread.Sheets Namespace > Events type : SheetMoving Event
The sheet that triggered the event.
The sheet's name.
The old sheet index.
A value that indicates the index will be moved to.
A value that indicates whether the operation should be canceled.
Occurs before the user drags and moves the sheet.
Syntax
var instance; // Type: Events
instance.SheetMoving = function(sheet, sheetName, oldIndex, newIndex, cancel) { };
SheetMoving = function ( 
   sheet : Worksheet,
   sheetName : string,
   oldIndex : number,
   newIndex : number,
   cancel : boolean
) { };

Parameters

sheet
The sheet that triggered the event.
sheetName
The sheet's name.
oldIndex
The old sheet index.
newIndex
A value that indicates the index will be moved to.
cancel
A value that indicates whether the operation should be canceled.
Example
//This example uses the SheetMoving 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