Then you probably want the DataGrid.CurrentCellChanged event.
ms-help://MS.VSCC/MS.MSDNVS/cpref/html/frlrfsystemwindowsformsdatagridclasscurrentcellchangedtopic.htm
e.g.:
Private Sub DataGrid1_CurrentCellChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DataGrid1.CurrentCellChanged
Oh and as to:
based on:Code:Dim sFirstCell As String = e.Item.Cells(0).Text Dim sSecondCell As String = e.Item.Cells(1).Text
ms-help://MS.VSCC/MS.MSDNVS/cpref/html/frlrfsystemwindowsformsdatagridclassitemtopic.htm
it would end up being (at least the way I would do it):
Code:Dim sFirstCell As String = DataGrid1(DataGrid1.CurrentRowIndex, 0) 'cell 0 Dim sFirstCell As String = DataGrid1(DataGrid1.CurrentRowIndex, 1) 'cell 1




Reply With Quote