Further, let’s say that you’d like to know as soon as the user has made a change to their selection.
Following code shows how one can use Before Exit Edit Mode event to perform input validation.
For an overview of how to handle events in Visual Basic or Visual C#, see Event Handlers in Visual Basic and Visual C#.
This argument can be used to prevent the cell from leaving edit mode unless a certain condition is met.
When a cell is not in edit mode, the control's Is In Edit Mode property is set to False.
When this event fires, the contents of the editor have not been applied to the grid.