We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GGC binding to business object and CommandStack

Thread ID:





53019 Dec 7,2006 08:09 AM UTC Dec 8,2006 02:46 PM UTC WinForms 2
Tags: GridControl
Administrator [Syncfusion]
Asked On December 7, 2006 08:09 AM UTC

Hi together,

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)

So Undo() is called but the cell value remains. What do I have to implement in my business object to support the commandstack?

Thank's for any help


Administrator [Syncfusion]
Replied On 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.


Administrator [Syncfusion]
Replied On December 8, 2006 02:46 PM UTC

Hi Clay,

nice to "read" from you - Your example is great, thanks a lot.



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon