Question Display value in Datagridview

tqmd1

Well-known member
Joined
Dec 5, 2009
Messages
60
Programming Experience
Beginner
Dear Experts

I use following codes to select data in ListView1, given value in textbox1.text. That codes work fine.

Textbox1 data is integer and DataGridView1 first Column Value is Integer. I want to locate this value in Grid.

My question is how to select data in DataGridVeiw, given data in textbox1.

Please help

VB.NET:
Dim itmX As ListViewItem = ListView1.FindItemWithText(TextBox1.Text, False, 0)
        If Not itmX Is Nothing Then
                     itmX.Selected = True
            ListView1.Items(itmX.Index).Selected = True
            itmX.EnsureVisible()
End If
 
Back
Top