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.
This, therefore, undoes any action you perform in the handler.
To customize the display characteristics of the control, set the properties of the object returned by the The Data Grid View control hosts one editing control at a time, and reuses the editing control whenever the cell type does not change between edits.
When attaching event-handlers to the editing control, you must therefore take precautions to avoid attaching the same handler multiple times.
We're a friendly computing community, bustling with knowledgeable members to help solve your tech questions.
Load ' Initialize the Binding Source and bind the Data Grid View to it. Data Source = Get Data("select * from Customers") Grid View1. Auto Resize Columns( _ Data Grid View Auto Size Columns Mode. Control, Data Grid View Text Box Editing Control) .Text = "1/1/2001" End With End If End Sub Private Sub Handle Dgv Editing Control Showing(sender As Object, e As Data Grid View Editing Control Showing Event Args) Handles Dgv.What you have to do instead is change the value in the editing control (remembering not to cancel the event).For example, for a Your response was great and saved me lots of time.