We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Spreadsheet change event

Thread ID:

Created:

Updated:

Platform:

Replies:

125648 Aug 30,2016 04:03 PM Aug 31,2016 04:53 AM JavaScript 1
loading
Tags: ejSpreadSheet
Gabriel Axel
Asked On August 30, 2016 04:03 PM

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.

Silambarasan I [Syncfusion]
Replied On August 31, 2016 04:53 AM

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 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;