I have a MSHFlexGird (fgdCompany) and a search command. When the user enters the search data into "txtSearch", the command should search for the data and show it to the user by :
Highlighting the record in the MSHFlexGrid -OR- By bringing the row that contains the searched data to the top of the MSHFlexGrid.
The code that I am using is given below. The search function works perfectly. Only thing is I can't make the record that contains the searched data be highlighted so that the user knows in which record the data that was search data is present. Can anybody could give me the code to highlight the record found in any of the two methods given above (preferably the first option).
Dim xString As String, xRow As Integer, xNext As Integer xString = txtSearch.Text For xNext = 0 To fgdCompany.Rows fgdCompany.Row = xNext xRow = fgdCompany.Row If xString = fgdCompany.TextMatrix(xRow, 1) Then 'Assuming that the string is in coloumn 1... myRow = fgdCompany.Row Exit For End If Next xNext