1
I own a datagridview of employees and I can filter them through the name of each employee through this code:
FuncionariosBindingSource.Filter = "nome like'%" & TextBox1.Text & "%'"
In this same datagridview I have a column "year" that is marked the employee entry, I wonder if there is a way to filter the name and year of the employee. For example in textbox1 type "Joao" and in textbox2 (For the year) type 2015, there appeared only Joao 2015.
Someone could help me?
I understood more or less this link, my difficulty is to adapt, because the site that Voce passed is c# and I’m using basic look and I’m not able to fit this code. I tried so :
FuncionariosBindingSource.Filter = "nome like '%" + TextBox1.Text + "%' AND ano = " + TextBox2.Text
and it didn’t work out– Mateus Justino
Now I got it with that code here:
FuncionariosBindingSource.Filter = "nome LIKE '%" + TextBox1.Text + "%' and ano LIKE '%" + TextBox2.Text + "%'"
Thanks for the help!– Mateus Justino
The link was more like you had a real sense of how to do it... I’m glad you made it.
– Wellington Araujo