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

Cell Validation

Hi, 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.

1 Reply

AD Administrator Syncfusion Team December 28, 2004 11:35 PM UTC

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;

Loader.
Up arrow icon