In a datagrid, I would like to compare a cell values to itself (before and after making the changes) and return the cell position if the cell is changed. I tried it with CurrentCellChanged/CurrentCellChanging event handler and it does not seem to work. How do I do it?
ADAdministrator Syncfusion Team February 23, 2004 12:28 PM
CurrentCellChanging fires with every keystroke. CurrentCellValidating fires when you try to leave the cell.
If you want to catch every keystroke, then use CurrentCellChanging. If you only want to handle the final changed value, then handle CurrentCellValidating.
In both places, you get the values like this:
GridCurrentCell cc = this.grid.CurrentCell;
string oldValue = this.grid[cc.RowIndex, cc.ColIndex].Text;
string newValue = cc.Renderer.ControlText;
ADAdministrator Syncfusion Team February 23, 2004 12:46 PM