Find and remove items from Datagridview

Is it possible to search for a specific text in a colum / row and then remove it automatically without any additional buttons. Please provide novice instructions or code help thanks.
LVL 1
Jack_JonesAsked:
Who is Participating?
 
CodeCruiserConnect With a Mentor Commented:
Try

reportData.DefaultView.RowFilter = "Description='" & txtDescription.Text & "'"
if reportData.DefaultView.Count = 1 Then
   reportData.DefaultView.Item(0).Delete()
End If
0
 
Shahan AyyubSenior Software Engineer - iOSCommented:
Hi!

Do you wish to remove the whole row(if text found in row(or cell of a row)) or emptied the cell(if found in the cell) ?

Also are you using bound datagridview ?
0
 
Jack_JonesAuthor Commented:
it's a bound datagridview, and the whole row would be deleted. Bound by the datagridview receives it's data from a database.
0
 
Jack_JonesAuthor Commented:
Thank you CodeCruiser ;)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.