Hello,
I would like to filter Gridview1 with, control checkbox, and code as "If GridView1 rows of column FirstName have value 'John' then show only this rows."
I have somehow with network help write this code. But code is not working as it should, and also I do not know how to add controls also for other rows with values such as 'James', 'Paul'...
For Each x As GridViewRow In Me.GridView1.Rows
If Not x.Cells(0).Value = "John" Then
x.Visible = False
End If
Next
Database:
FirstName; SecondName
James ; White
John ; Brown
Paul ; Red
John ; Black
Paul ; Blue
James ; Green
So, need someone for help, to give a tip, or to show how would be easier.
Thank you in advance for help.