I am altering the question now!
I have the search working using the following:
//check the array for a match
foreach (Delivery d in mainForm.myDeliveries)
{
if (d.DeliveryName == searchValue)
{
ListViewItem item = lstDeliveryDetails.Items.Add(d.DeliveryName);
item.SubItems.Add(d.DeliveryAddress);
item.SubItems.Add(d.DeliveryDay);
item.SubItems.Add(d.DeliveryTime);
item.SubItems.Add(d.DeliveryMeal);
item.SubItems.Add(d.DeliveryInstructions);
item.SubItems.Add(d.DeliveryStatus);
}
}
My question is, what is the best way to now search all the other values, to make a complete search?
I know i could do if else statements and go through address, day, time, etc.
Is there a better way to acheive this?
And at the moment, the user has to enter the entire name to get the result, can i make it if they only enter a part of the name?
Clear all items from your list view and only add the ones that match the search criteria: