I have an unbound grid that I am allowing the user to input data into just 1 column. I want to validate the input as it is being entered and I have managed to use the LeavingEdit event of the Cell to do this. However, I am unable to prevent the user from moving away from the cell when the contents are not valid. I can display a message but the selection moves to the new location regardless of whether the input is valid or not. The best I am able to do is cancel the edit and revert the cells contents back to its previous value which is not very user-friendly.
How can I stop the current selection from moving when my validation routine identifies that the contents are invalid?
Imported from legacy forums. Posted by TechnoTone (had 2088 views)