Recognize changes in Spreadsheet

Hi there,
I want to know, how I can recognize in my UPW c# program if any change has happend to the spreadsheet.
In case a user has modified his sheet or workbook but not et saved I want to warn the user before he closes the app.
Which evnt/events can i use to set my ownflag for this?
Or is a state build in the spreadsheet which I can can use to recognize if the sheet /workbook was modified?
Kind regards Frank


3 Replies 1 reply marked as answer

AR Arulpriya Ramalingam Syncfusion Team August 5, 2020 02:17 AM UTC

Hi Frank, 
 
Thank you for using Syncfusion products. 
 
To notify the application whenever the value is changed in the spreadsheet, the CurrentCellValidated event can be used to save the changes. Please make use of the below code example for further details. 
 
Example code 
 
private void Sheet_WorkbookLoaded(object sender, Syncfusion.UI.Xaml.Spreadsheet.Helpers.WorkbookLoadedEventArgs args) 
{ 
    //Event subscription 
    Sheet.ActiveGrid.CurrentCellValidated += ActiveGrid_CurrentCellValidated; 
} 
//Event customization 
private void ActiveGrid_CurrentCellValidated(object sender, Syncfusion.UI.Xaml.CellGrid.Helpers.CurrentCellValidatedEventArgs e) 
{ 
    Sheet.Save();    
} 
 
Please get back to us, if you need any further assistance. 
 
Regards, 
Arulpriya 


Marked as answer

SR Sabitha Rajamani Syncfusion Team August 6, 2020 07:12 AM UTC

From: frank.pohl
Sent: Wednesday, August 5, 2020 12:28 PM
To: Syncfusion Support
Subject: AW: Syncfusion support community forum 156610, Recognize changes in Spreadsheet, has been updated. 
  
 
Hello thank you for tis snippet. 
It is exactly was is was looking for. 
You can close the ticket. 
Frank


AR Arulpriya Ramalingam Syncfusion Team August 10, 2020 06:28 AM UTC

Hi Frank, 
 
Thank you for the update. 
 
We are glad that the provided solution resolved your use case. Please get back to us, if you need any further assistance. 
 
Arulpriya 


Loader.
Up arrow icon