SpreadJS Documentation
Using Events when the Sheet Tab Changes

You can use events when the sheet tab changes.

Using Code

This example cancels the tab change.

JavaScript
Copy Code
var spread = new GcSpread.Sheets.Spread($("#ss").get(0),{sheetCount:3});
spread.addSheet();

spread.bind(GcSpread.Sheets.Events.ActiveSheetChanging, function (sender, args) {
    //Cancel sheet switching.
    args.cancel = true;
});

spread.bind(GcSpread.Sheets.Events.ActiveSheetChanged, function (sender, args) {
    console.log("Active sheet has been switched.");
});
See Also

Developer's Guide

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.