I've searched around the web a bit but cant find exactly what I'd like. I have a keyup script on a textbox that filters data from a database and loads a datagridview. I was just thinking it would be nice to highlight any text found in any cell that matched the search string typed in the textbox. Just a thought Dim PartColsSearch As String = "ID, Image, SerialPN, MYPN, CustomerPN, CustomerID, CustomerName, REV, Description, " & "Surcharge, PriceEA, PriceBreak, DateModified, UpdatedBy, Notes" Using mysqlconn As New MySqlConnection(My.Settings.MySQLconn) Using PartsDA As New MySqlDataAdapter("select " & PartColsSearch & " from tgt.parts where mypn like '%" & tb_search.Text & "%' OR customerpn like '%" & tb_search.Text & "%' Or Description Like '%" & tb_search.Text & "%' order by SerialPN Asc", mysqlconn) Dim PartsCB As New MySqlCommandBuilder(PartsDA) PartsTable.Clear() PartsDA.Fill(PartsTable) PartsBS.DataSource = PartsTable With dgv_parts End With PartsCB = Nothing End Using End UsingLive as if you were going to die today, learn as if you were going to live forever -Mahatma Gandhi 解决方案 这篇关于在DGV中突出显示文本,在文本框中匹配文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!