Public Shared Function GetRow(ByVal theGrid As DataGridView) As DataRow
GetRow = Nothing
If theGrid IsNot Nothing Or theGrid.DataSource IsNot Nothing Then
Dim drv As DataRowView = CType(theGrid.CurrentRow.DataBoundItem, DataRowView)
GetRow = CType(drv.Row, DataRow)
End If
End Function

Don’t forget to handler the exception if the dataBoundItem is nothing with the NullReferenceException