1
I need to filter in my DataGridView
which has as the datasource one BindingSource
(filtro_descricao
).
I need to search the lines for the text typed in textbox1
regardless of the order they are in the columns, for example:
Typing "Baby" I find two lines.
But if I type "White" which is a color, in front of "Baby" without the "look", the filter does not find anything. Look:
This is the command I use to filter:
Private Sub BuscaProduto()
frm_gerar_pedido.filtro_descricao.Filter =
"[cat_produto] Like'%" + TextBox1.Text + "%'" _
& "or [descricao_produto] Like'%" + TextBox1.Text + "%'" _
& "or [formato] Like'%" + TextBox1.Text + "%'" _
& "or [cor] Like'%" + TextBox1.Text + "%'" _
& "or [tamanho] Like'%" + TextBox1.Text + "%'" _
& "or [manga] Like'%" + TextBox1.Text + "%'"
End Sub
What can it be?
If you filter by "White Baby," you’re not filtering out two separate words "Baby" and "White," you’re looking in every column for something that contains "White Baby" in the cell.
– Focos
What is the purpose of the research "white baby"? Appear in the same two rows because there are columns that have the word "baby" and "white", or just the first because it’s only which has two columns with "baby" and "white"?
– João Martins