title: When entering an invalid entry in DataGridView Cell after entering a valid entry, how do I get the current cell value?
body: <p>I have a DataGridView control that has a TextBox Column. On the DataGridView.CellValidating event, I use the following code to verify that the entry is an acceptable date:</p>
  
  <pre><code>dgvStartingGrid.EndEdit()
  Dim dteStartTime As DateTime
  If Not Date.TryParse(dgvStartingGrid.CurrentRow.Cells(4).Value, dteStartTime) Then
      MessageBox.Show("Please enter a starting time in one of the following formats:" &amp; vbCrLf &amp; _
      vbCrLf &amp; "- MM/DD/YY HH:MM:SS (24 Hour Format)" &amp; vbCrLf &amp; "- HH:MM:SS (24 Hour Format)" &amp; _
      vbCrLf &amp; "- HH:MM:SS (AM/PM) (12 Hour Format)", "Start Time Entry Error")
      e.Cancel = True
  End If
  </code></pre>
  
  <p>This code works fine the first time the cell is edited.</p>
  
  <p>The trouble that I am having is that IF I enter a valid date, and then later come back to the cell and enter an invalid date, on the CellValidating event, it skips over this If...End If block because it shows that the current cell value is the old valid date, not the invalid entry that is currently in the cell.</p>
  
  <p>How do I commit or get the invalid value that currently resides in the DataGridView cell?</p>
  
  <p>Thanks</p>