Spread for Silverlight provides the functionality where users can undo their last operation using Ctrl+Z. However, one of the Spread users suggested that spread should also offer the option to undo the operation of adding and removing rows. This prompted me to come up with this blog. For the implementation, we need to create a custom class which Implements IUndo interface and inherits from ActionBase class for both our add and remove undo functionality. Following code shows how to Add/Remove Rows :
Now we have a custom undo class ready for AddUndo action. Create an object of this AddRowsUndo class and pass it to Do() method of Spread’s UndoManager class.
With the above code you will be able to add rows and undo it using Ctrl+Z. Please download the attached sample for detailed implementation for Undo action for Add and remove rows. Download VB sample Download C# Sample