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

Datagrid Validation

Hi, 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? Please help. Chris

2 Replies

AD Administrator 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;


AD Administrator Syncfusion Team February 23, 2004 12:46 PM

Thanks a lot.

Loader.
Live Chat Icon For mobile
Up arrow icon