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: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Formula cell undo/redo in GridControl

Thread ID:





29789 Jun 2,2005 07:15 PM UTC Jun 2,2005 07:44 PM UTC WinForms 1
Tags: GridControl
Tom Abraham
Asked On June 2, 2005 07:15 PM UTC

I''ve asked previously about undo/redo support for FormulaCells in a GridControl. Clay indicated that I would have to write custom commands, but now I''m not so sure. Background: my grid is about 700x75, with probably 60 SUMIF formulas in each column. Some formulas rely on the results of other formula cells. I see by reviewing the undo stack that changing one numeric value triggers about 5-6 undo commands as the other formulas recalculate. So, it seems that the GridControl does support undo for FormulaCells. The problem is that those undo commands were not wrapped in a transaction, so I have to undo 5-6 times when the same situation in Excel would require 1 undo. I''ve been trying to figure out if there is some way to create a transaction around the user-initiated change and the automatic changes. However, there is no flag that indicates whether user input or code triggered the change. Another thing that I need to handle soon is somewhat related. If a user changes a cell value, I need to programatically change other cells to maintain a certain relationship. Those should also be grouped into one undo. The idea is similar to Excel Goal Seek. To make matters worse, is firing SaveCellInfo at LEAST twice for every change. I''m pretty sure I''ve recorded six hits for one change to a FormulaCell. What can I do? Thanks! Tom

Administrator [Syncfusion]
Replied On June 2, 2005 07:44 PM UTC

The SaveCellInfo being raised twice is logged in this defect. http://www.syncfusion.com/support/issues/grid/Default.aspx?ToDo=view&questId=284 As far as setting up transactions, maybe try handling CurrentCellMoved. This is just a rough idea. It may take some additional events to handle all possibilities. The idea would if there is a transaction recorded, then commit it, and begin a new one. This way anything that happen as the user was typing in a cell would essentially be one transaction. You may have to handle special cases like teh user clicking off teh grid and not really hitting CurrentCellMoved. But just handling CurrentcellMoved and testing if things work ok there would probably not take that much time to see it this will be feaseable. If so, then you could spend the additional time handling the more special situations.


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

Live Chat Icon For mobile
Live Chat Icon