Spreadsheet change event

Greetings,

Is there an event that fires whenever the user makes changes to the spreadsheet (changes cell content, add/delete sheets, charts, pictures, etc') but not on non-modifying operations (cell/picture/chart selection, moving between sheets etc').

Thanks.

1 Reply

SI Silambarasan I Syncfusion Team August 31, 2016 08:53 AM UTC

Hi Gabriel, 
 
Thank you for using Syncfusion products. 
 
Your requirement can be achieved by using Spreadsheet client-side events “cellSave” triggered on cell content changes and “actionComplete” for add/delete sheets, charts & picture.  Please refer the following code example.  
 
 
<div id="Spreadsheet"></div> 
 
$(function () { 
    $("#Spreadsheet").ejSpreadsheet({ 
        importSettings: 
        { 
            importMapper: "http://js.syncfusion.com/demos/ejservices/api/JSXLExport/Import" 
        }, 
        cellSave: "onCellSave", 
        actionComplete: "onActionComplete" 
    }); 
}); 
 
function onCellSave(args) { 
    // Your code here - on cell save. 
} 
 
function onActionComplete(args) { 
    switch (args.reqType) { 
        case "gotoSheet": 
            if (args.newSheet) { 
                // Your code here - on adding new sheet. 
            } 
            break; 
        case "remove-sheet": 
            // Your code here - on removing sheet. 
            break; 
        case "shape": 
            if (args.shapeType === "chart" && args.actionType !== "reorder") { 
                // Your code here - on chart creation. 
            } 
            else if (args.shapeType === "picture") { 
                // Your code here - on insert picture. 
            } 
            break; 
    } 
} 
 
 
For your convenience, we have prepared a sample to demonstrate this in JS Playground.  Please refer the below link, 
 
For more information, please refer below online API help documentation link about events in Spreadsheet.  
  
 
 
Regards, 
Silambarasan I 


Loader.
Up arrow icon