I had a datagridview(dgvName) that was primarily used to load data from
a certain table of my database.Using the datasource option in my
datagridview's properties, I choose the table and in the Column, I
bound a certain column(Name)...Now I had also a TextBox(tboxSearch)
which I want to use as a way to search the data of my dgvName..I want
the seaching to be incrementally, that is, when I type a single letter
in the textbox, say A, cell will point to Aaron and when I type Ab, it
will point to Aban and so on.Anyway I am using visual studio.net 2005 edition..Can somebody help me please... thanks.

Making an Incremental Search
ChupaChupa
Darren Tao
Private Sub tboxSearchPatient_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles tboxSearchPatient.TextChanged
Dim ix As Integer
For ix = 0 To dgvPatients.RowCount - 1
With dgvPatients.Rows(ix).Cells(0)
If Not .Value Is Nothing AndAlso .Value.ToString() Like tboxSearchPatient.Text & "*" Then
.Selected = True
Exit For
End If
End With
Next
End Sub
and for the second one:
Private Sub tboxSearchPhysician_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles tboxSearchPhysician.TextChanged
Dim i As Integer
For i = 0 To dgvDoctors.RowCount - 1
With dgvDoctors.Rows(i).Cells(0)
If Not .Value Is Nothing AndAlso .Value.ToString() Like tboxSearchPhysician.Text & "*" Then
.Selected = True 'this is where the exception was thrown.
Exit For
End If
End With
Next
End Sub
maitung
if not .value is nothing andalso .visible andalso .value.tostring...
keithster
Dim ix As Integer
For ix = 0 To DataGridView1.RowCount - 1
With DataGridView1.Rows(ix).Cells(0)
If Not .Value Is Nothing AndAlso .Value.ToString() Like TextBox1.Text & "*" Then
.Selected = True
Exit For
End If
End With
Next
Busy
David B.