I need to filter the data that is displayed in a listbox. In a textbox I write the number that I need, the problem is that in the listbox it only shows me the value when I write it the same, I need to do a search that compares the numbers as it is written in the textbox, regardless of whether the numbers have uppercase letters or mini-maps, the search should always be done.
This way I was doing it in the text changed event but it is only fulfilled when it is equal to the textbox number:
lbPartes.Items.Clear();
foreach (DataRow rw in fw.dtAllTable.Rows)
{
if (rw["Circuit"].ToString() == txtBuscar.Text)
{
lbPartes.Items.Add(rw["Circuit"].ToString());
break;
}
}
partRelCode = -1;