I would like to manipulate a cell in my Data Grid View when it is validating so that if the user enters a value that is not valid for the database, but is easily converted to valid data, the program will change the value to an appropriate one.I am able to validate my value properly but when I try to change it to something valid I get a Data Error. You should never attempt to change the cell value in the handler for this event, because unless you cancel the event (in which case the user is stuck in edit mode), the cell value is set to the value from the editing control immediately after the event finishes.When this event is canceled in data bound mode, the new value is not pushed to the underlying data source.When this event is canceled in virtual mode, the Cell Value Pushed event is not raised.So the Cell Validating event cannot be fired when pressing the "Enter" key. The following code example shows how to use this event to validate the cell's value.If you want the Cell Validating event to fire, assign the "Enter" key to the Selection Actions. To run this example, create a windows form, and add a Gc Multi Row control to the form.
event, value calculates when I leave the next cell.The event handler receives an argument of type Cell Validating Event Args containing data related to this event.The following Cell Validating Event Args properties provide information specific to this event.Handle the Cell Validated event to perform post validation processing.Canceling this event cancels the changes to the current cell.