So I have this 2 listview listView1 has 6 columns named a,b,c,d,e,f then listView2 has 2 columns named a,b
so for example. listview2 row 0 column a has "Joshua" and listview1 has "Joshua", "ex","ex"","ex" and so on.
the plan is to check listView1 if there is/are rows that contains listView2 column a values. if there are equal values listView2 column b must show "Incomplete", however if listView2 doesnt contain any value from listView1, listView2 column b must show "Complete".
What I have tried:
I have this code, it is working but no matter how I change and attempt to trap the value I want, it still displays "Incomplete" in listView2 column b.
for(int re = 0; re < listView1.Items.Count; re++)
{
Orders frm = new Orders(this);
l1[re] = listView1.Items[re].SubItems[2].Text;
for (int er = 0; er < listView2.Items.Count; er++)
{
l2[er] = listView2.Items[er].SubItems[0].Text;
if ((l1[re] != l2[er] || listView1.Items.Count == 0) && checking == "noblanked")
{
listView2.Items[er].SubItems[1].Text = "Complete";
}
if (l1[re].Contains(l2[er]) || checking == "blanked")
{
listView2.Items[er].SubItems[1].Text = "Incomplete";
}
listView2.Items[er].SubItems[1].Text = listView2.Items[er].SubItems[1].Text;
}
}