Hi.
I need to detect when the content of a spreadsheet cell has changed.
I'm able to find out a cell was changed by a user interaction, by hooking to the EditModeExited event.
But I have been unable to find a way to detect when the cell content is changed programmatically, e.g. by an Undo command.
Is there any features what would allow me to do this?
Thank you.
Best regards,
Raul
Hello Michael,
I try to clarify:
I don't need to be notified that an undo command has been issued per se.
I need to know which cell values have been changed by the undo command.
In general, I need to know when the value of one or more cells have changed, so that I can retrieve the updated values and use them to set another control on screen.
As I said, this can be accomplished when the user changes a cell e.g. by typing a new value, but not when the value of a cell changes because of an undo command.
Thank you
Regards
Hello Raul,
Thank you for posting in our forums!
You can handle the UltraSpreadSheet's PerformingAction event (or PerformedAction if you need to know after the action has occurred). These events fire when indirect user interactions occur, like with Undo.
For example, you can use this code:
private void Spreadsheet1_PerformingAction(object sender, SpreadsheetPerformingActionEventArgs e) { UltraSpreadsheetAction action = e.Command; if (action == UltraSpreadsheetAction.Undo) MessageBox.Show("Undo", "Action Occurred"); }
There are many actions available to handle if you need them. If you have any further questions or concerns with this, please let me know and I will be glad to help.