After some searching through google, I came across a similar code to the following which checks if a cell is in edit mode, I made a small modification to validate a row, but am not sure how to do the above.
Public Class Form1 Private Sub DataGridView1_CellValidating(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellValidatingEventArgs) Handles DataGridView1.CellValidating Dim cell As DataGridViewCell = DataGridView1.Item(e.ColumnIndex, e.RowIndex) If cell.IsInEditMode Then Dim c As Control = DataGridView1.EditingControl Select Case DataGridView1.Columns(e.RowIndex).Name Case "Column1" MsgBox(c.Text) Case "Column2" MsgBox(c.Text) End Select End If End Sub End Class
The odd thing about rowindex is the fact that it also freezes the program when more then 2 entries have been made...
Edited by timdav83, 07 April 2010 - 02:01 PM.