A little late but would this be what you are after?
Private Sub DataGridView1_CellValidating(ByVal sender As Object, ByVal e
As System.Windows.Forms.DataGridViewCellValidatingEventArgs) Handles
DataGridView1.CellValidating
Dim CurrentCell As DataGridViewCell =
DataGridView1.Item(e.ColumnIndex, e.RowIndex)
If CurrentCell.IsInEditMode Then
Dim GridControl As Control = DataGridView1.EditingControl
Console.WriteLine("------------------------------------")
Console.WriteLine("Edited value ""{0}"" Former value ""{1}""",
GridControl.Text, DataGridView1.Item(e.ColumnIndex,
e.RowIndex).Value.ToString)
Console.WriteLine("------------------------------------")
End If
End Sub
>I am not seeing a clean way from a derived DataGridViewCell to determine
>when
> the value is changed. The value changed event gets thrown in the
> DataGridView not the cell. What am I missing?
Oldman - 27 Jun 2007 21:56 GMT
Thanks for the response Kevin. Your example is using an event in the
DataGridView.
I am writing a custom DataGridViewCell and I was trying to determine when
the value in my cell was changed.
> A little late but would this be what you are after?
>
[quoted text clipped - 18 lines]
> > the value is changed. The value changed event gets thrown in the
> > DataGridView not the cell. What am I missing?