I'm setting values using the cell.Value = method in code behind but its not getting recorded in the undo history.
Awesome! That works. Thanks for your help.
Hello,
I have been investigating into your issue and even though there doesn't seem to be a built-in way to make the undo remember code behind changes, there is a way to simulate that this is done through the user input. In order to simulate that you need to start edit mode change the editor’s text and exit edit mode. If you are doing this in your CellActivated or CellChanged event you can do something like this:
CellValuePresenter cvp = CellValuePresenter.FromCell(e.Cell);
cvp.Editor.StartEditMode();
cvp.Editor.Text = "99";
cvp.Editor.EndEditMode(true, true);
and that way the changes will be included in the undo queue.
Please let me know if you require any further assistance on the matter.