| sidebar_label | afterSheetChange |
|---|---|
| title | afterSheetChange event |
| description | You can learn about the afterSheetChange event in the documentation of the DHTMLX JavaScript Spreadsheet library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Spreadsheet. |
@short: Fires after the currently active sheet is changed
afterSheetChange: (sheet: object) => void;The callback of the event takes the following parameters:
sheet- (required) an object with the name and id of a newly active sheet
const spreadsheet = new dhx.Spreadsheet("spreadsheet", {});
spreadsheet.parse(data);
// subscribe on the "afterSheetChange" event
spreadsheet.events.on("afterSheetChange", function(sheet) {
console.log("The newly active sheet is " + sheet.name);
console.log(sheet);
});Changelog: Added in v4.1
Related articles: Event handling