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.
Unfortunately, activation email could not send to your email. Please try again.

On changing cell value which event will give me old and new value of cell

Thread ID:

Created:

Updated:

Platform:

Replies:

55459 Jan 30,2007 12:50 PM Jan 30,2007 10:49 PM Windows Forms 1
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On January 30, 2007 12:50 PM

While changing the cell value which event will give me the old and new(changed) value of the cell. I need to do some comparision of old value and changed value .

Please help

Thanks

Administrator [Syncfusion]
Replied On January 30, 2007 10:49 PM

Hi,

The Renderer.ControlText returns the active cell’s display text and the grid[row, col].Text will return the text/value of a particular cell that is stored internally in the GridData object.

Please try this code snippet in any one of the events like CurrentCellValidating, CurrentCellChanged, or CurrentCellValidated.

GridCurrentCell cc =this.grid.CurrentCell;
string oldvalue=string.Empty;
string newvalue=string.Empty;
oldvalue = this.grid[cc.RowIndex, cc.ColIndex].Text;
newvalue = cc.Renderer.ControlText;
Console.WriteLine(("OldValue=" + oldvalue));
Console.WriteLine(("NewValue=" + newvalue));


Thanks for choosing and using Syncfusion Products.

Best Regards,
Jeba.

CONFIRMATION

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.

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.

;