''' <summary>
''' Finds the phrase.
''' </summary>
''' <param name="grid">The WinGrid reference.</param>
''' <param name="s">The string you want to look for.</</param>
Public Shared Sub FindPhrase(ByVal grid As UltraGrid, ByVal s As String)
For Each row As UltraGridRow In grid.Rows
For Each cell As UltraGridCell In row.Cells
If cell.Text.Contains(s) Then
'The cell must be activated first
cell.Activate()
'Cell must be in edit mode to perform selection
grid.PerformAction(UltraGridAction.EnterEditMode)
'Start the selection
cell.SelStart = cell.Text.IndexOf(s)
'For this length
cell.SelLength = s.Length
'For eye candy, make this the first visible row
grid.DisplayLayout.RowScrollRegions(0).FirstRow = row
Exit Sub
End If
Next
Next
End Sub