Searching text in datagridview column in

I have a datagridview with list of items in the column. I have a text box where i type a search string.

Currently i have implemented a method which is working in almost all scenarios except the following one
  Suppose a list contains a 24hrs S Creatinine and S creatinine and when i type a  creatinine
   it searches first occurance of the string and highlights it.

My code for the same is as below.

Private Sub TextBox9_TextChanged(sender As System.Object, e As System.EventArgs) Handles TextBox9.TextChanged


        dgvOIList.Sort(dgvOIList.Columns("Oiname"), System.ComponentModel.ListSortDirection.Ascending)
        Dim rowindex As Long = GridRowLocator(dgvOIList, "Oiname", TextBox9.Text.ToUpper, "Text")
        If rowindex = -1 Then Exit Sub

        dgvOIList.Rows(rowindex).Selected = True
        dgvOIList.FirstDisplayedScrollingRowIndex = rowindex

        dgvOIList.CurrentCell = dgvOIList.Item("Oiname", CInt(rowindex))
        dgvOIList.CurrentCell.Selected = True

    End Sub

Public Function GridRowLocator(ByVal dtg As DataGridView, ByVal ColumnName As String, _
                                         ByVal ValueToSearch As String, ByVal strSearchType As String) As Long

        Dim CurrentRowIndex As Long = -1

            Select Case strSearchType.ToUpper


                Case "TEXT"

                    If dtg.Rows.Count > 0 Then
                        For i = 0 To dtg.Rows.Count - 1
                  dtg.Rows(i).Cells(ColumnName).Value.ToString.Contains(ValueToSearch.ToUpper) = True Then
                                CurrentRowIndex = dtg.Rows(i).Index
                                Exit For
                            End If
                    End If

            End Select
        Catch ex As Exception
            MsgBox("Error: " & ex.Message, MsgBoxStyle.Information)
        End Try

        Return CurrentRowIndex

    End Function

My requirement is all the list items containing the search string should be grouped together one below another.  Can some expert pls advise on how to do this.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jerry MillerCommented:
Rather than build something yourself, have you looked at the Ajax Control Toolkit? The AutoComplete Extender does this very well.
venkataramanaiahsrAuthor Commented:
It is windows forms application. I could solve the said problem in another way by using bindingsource filter method.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
venkataramanaiahsrAuthor Commented:
It is windows forms application. I could solve the said problem in another way by using bindingsource filter method.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.