Cell Text Changed

What is the best was to tell if the text in a cell has changed from an old value to a new value when the current cell moves?

1 Reply

RA Rajagopal Syncfusion Team May 2, 2007 01:48 AM UTC

Hi Marc,

In the CurrentCellValidating event handler, you can detect the cell value being changed. Below is the code snippet.

void gridControl1_CurrentCellValidating(object sender, CancelEventArgs e)
{
GridCurrentCell cc = this.gridControl1.CurrentCell;
string newValue = cc.Renderer.ControlText;
string oldValue = this.gridControl1.Model[cc.RowIndex, cc.ColIndex].CellValue.ToString();
Console.WriteLine("CellValue changed. OldValue: {0} - NewValue: {1}", oldValue, newValue);
}

Thanks for using Syncfusion Products.
Regards,
Rajagopal

Loader.
Up arrow icon