i need help about sarch
i want to make a search and see highlight the result
can u help me
Private Sub search_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles search.Click
Try
Dim view As DataView = New DataView(Dscustomers1.Customers)
view.Sort = "CustomerID"
Dim i As Integer = view.Find(txtbox.Text.ToString)
If i > Dscustomers1.Customers.Rows.Count Or i < 0 Then
MsgBox("Record Not found", MsgBoxStyle.Information, "Record Not Found")
Else
CM.Position = i ' Synchronizes Cm and Grid Pointer.
Console.WriteLine(CM.Position)
End If
Catch ex As Exception
MsgBox(ex.ToString)
End Try
|