i want to search for an item in a datagrid view via a textbox .. so i type something in the textbox like the product name .. and he finds it ..
i use visual studio 2010 and access database
abdalqader.abdelhalem
0
Newbie Poster
Recommended Answers
Jump to PostYou can scan through the rows with a For Each, then scroll to the row (if found). An example is
For Each row As DataGridViewRow In DataGridView1.Rows If row.Cells(1).Value = txtName.Text Then row.Selected = True DataGridView1.FirstDisplayedScrollingRowIndex = row.Index Exit For End If Next
All 2 Replies
Reverend Jim
4,780
Hi, I'm Jim, one of DaniWeb's moderators.
Moderator
Featured Poster
kRod
49
Junior Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.