How do I program the click a specific cell in a datagrid after I have
found the row desired?
I am trying to automatically click a cell button once the specific row I
need is found in a datagrid. The edit button (located in cell(0)) has code
that brings up a record. I just want to perform a cell-click
automatically.
Here is the code:
Dim dd As DateData = CType(Me.Tag, DateData)
If dd Is Nothing Then
'do nothing
Else
Dim askNo As String = CStr(dd.EID)
Dim indexNumber As Integer = 0
'search the grid until you find the EID number
For Each r As DataGridViewRow In TblMasterListDataGridView.Rows
Dim idNo As String = CStr(r.Cells(1).Value)
Dim indexRow As Integer = r.Index
If idNo = askNo Then
'GET THE ROW'S INDEX NUMBER
indexNumber = indexRow
'NOW CLICK CELL(0)
'=========== r.(indexRow).Cells(0) = HOW DO I PERFORM
THIS CLICK????
End If
Next
End If