I have a client app written in Visual Studio 2008 searching datagrid view by passing the customer number and the datagrid.
The Row is highlighted when the customer is found. Most of the time, the selected row is not on the first page of the Datagrid.
Is it possible to programtically to scroll down the data grid so the selected row is visble without having the user to manually to scroll down?
Thanks,
Private Sub getRowIndex(byval a_customer as string ByVal a_dgrd As DataGridView)
For Each lcRow As DataGridViewRow In a_dgrd.Rows
if lcRow.Cells("Customer").Value.ToString = a_customer Then
a_dgrd.Rows(lcRow.Index).Selected = True
End If
Next
End Sub