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

CurrentCellValidated event

I am using the CurrentCellValidated event to detect invalid text added to a cell. If I detect invalid text I want to issue an error and keep the cursor in the cell. I tried canceling the move event, by setting a flag in the validate event and then canceling the move in the CurrentCellMoving event. This doesn't seem to work, any suggestions would be appreciated.

1 Reply

AD Administrator Syncfusion Team April 23, 2003 02:05 PM UTC

Try using the CurrentCellValidating event instead of the CurrentCellValidated event. In Validating, you can set e.Cancel to cancel the move. To get the new text, use grid.CurrentCell.Renderer.ControlText. You can also set grid.CurrentCell.ErrorMessage to have the grid display a message for you if you like.

Live Chat Icon For mobile
Up arrow icon