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.
ADAdministrator Syncfusion Team April 23, 2003 10:05 AM
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.