I need to validate the values entered in the cells of the gridcontrol.
I am handling currentcellvalidating event for the same.
My requirement is suppose the validation fails then the cell should contain the last valid value entered in it.
e.g. Suppose for my cell only numeric values can be entered.
Initially it has value 1.
Then the user enters "abc" so this being invalid the cell should retain 1 as the cellvalue.
ADAdministrator Syncfusion Team December 28, 2004 06:35 PM
In CurrentCellValidating, you can get the original value using
string s = this.grid[grid.CurrentCell.RowIndex, grid.CurrentCell.Colindex].Text;
Then set this text into the renderer:
grid.CurrentCell.Renderer.Control.Text = s;