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

GDBG undo/redo problem

Thread ID:





29292 May 22,2005 05:47 PM UTC May 22,2005 09:48 PM UTC WinForms 1
Tags: GridControl
Bob Wis
Asked On May 22, 2005 05:47 PM UTC

We are currently using the GridDataBoundGrid with the Undo/Redo feature. The Undo/Redo only seems to work on every other change. Here are the steps: 1) User makes change to cell 1,1 and hits tab 2) User makes change to cell and hits tab 3) repeat several times 4) hit ctrl-z to undo everything 5) every other change does not get undone. It appears that the undo is not always committed. Has anyone encountered this before? Bob

Administrator [Syncfusion]
Replied On May 22, 2005 09:48 PM UTC

Every other undo is probably undoing a selection command which does not really show up in the UI. Try this. First, set this.gridDataBoundGrid1.Binder.DirectSaveCellInfo = true; to avoid problem of the grid caching changes until you leave the row. If you want to transparently process the selection commands so your user sees a change with each ctlZ, in the undo menu handler (which has a ctlZ hotkey), use code like:
private void menuItem2_Click(object sender, System.EventArgs e)
	if(this.gridDataBoundGrid1.Model.CommandStack.UndoStack.Count > 0)

	object o = null;
	if(this.gridDataBoundGrid1.Model.CommandStack.UndoStack.Count > 0)
		o = this.gridDataBoundGrid1.Model.CommandStack.UndoStack.Peek();
	while(o is GridSelectionStateCommand)
		if(this.gridDataBoundGrid1.Model.CommandStack.UndoStack.Count > 0)
			o = this.gridDataBoundGrid1.Model.CommandStack.UndoStack.Peek();
			o = null;


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