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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback


Thread ID:





18005 Aug 21,2004 09:49 PM UTC Aug 22,2004 06:04 AM UTC WinForms 1
Tags: GridControl
Lori S. Pearsall
Asked On August 21, 2004 09:49 PM UTC

I have some columns in a grid that I need to trap changes to so that I can refresh a diagram in another window. I''ve got this working by putting the logic in CurrentCellAcceptedChanges. However, I''m not able to trap any changes to these cells as a result of an Undo/Redo operation. 1) What is the best way to determine whether an Undo/Redo operation changed the contents of a cell and, if so, which column? 2) Some of the columns in question are custom with their own CellRenderer classes. How would I, on a column basis, specify that changes to the column should NOT be recorded on the Undo stack? Thanks!

Administrator [Syncfusion]
Replied On August 22, 2004 06:04 AM UTC

1) Instead of CurrentCellAcceptedChanges, you might move your code to grid.Model.SaveCellInfo. This should be hit whether the change comes from the user or whether it is from a undo/redo. (If you need the value of the cell, get it from e.Style.CellValue.) 2) In grid.CurrentCellMoved, you can try turning off/on the commandstack when you are in a column that you do not want to support undo. Here is a try at turning it off for column 2.
private void gridDataBoundGrid1_CurrentCellMoved(object sender, GridCurrentCellMovedEventArgs e)
	GridCurrentCell cc = this.gridDataBoundGrid1.CurrentCell;
	if(cc.MoveFromColIndex == 2 && cc.MoveToColIndex != 2)
		this.gridDataBoundGrid1.Model.CommandStack.Enabled = true;
	else if(cc.MoveFromColIndex != 2 && cc.MoveToColIndex == 2)
		this.gridDataBoundGrid1.Model.CommandStack.Enabled = false;


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