The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
I am using a GGC which is bound to a business object (BindingList). Now I want to use the CommandStack option for undo and redo operations. So I activated the commandstack via:
ggc.TableModel.CommandStack.Enabled = true;
After I changed a cell value I do the following in my undo method:
if (!ggc.TableModel.CommandStack.InTransaction) { ggc.TableModel.CommandStack.Undo(); }
So Undo() is called but the cell value remains. What do I have to implement in my business object to support the commandstack?
ADAdministrator Syncfusion Team December 8, 2006 09:05 AM UTC
The GGC does not support the Undo/Redo architecture that is provided by GridControlBase. So, if you want to use this Undo/Redo support, you would have to add custom commands (derived from the abstract GridModelCommand) to manage the actions you want to support. Here is a minimal sample showing one way to handle undo/redo on user changed values. It uses a TableControlCurrentCellValidating to cache the old value, and TableControlCurrentCellAcceptedChanges to create an instance of the custom command and push it on the CommandStack. I also had to manually manipulate the Undo and Redo stacks.