I tried to add text color to any sub item in the listview by the index that the method get from the array
for (int i = 0; i < sizes.Length; ++i)
{
if (sizes[i] == 1)
{
Item.SubItems.Add("In Stock");
}
else if (sizes[i] == 0)
{
Item.SubItems.Add("Out Of Stock");
}
else if (sizes[i] == 2)
{
Item.SubItems.Add("Less Than 3");
}
else if (sizes[i] == 5)
{
Item.SubItems.Add("Less Than 5");
}
else if (sizes[i] == 10)
{
Item.SubItems.Add("Less Than 10");
}
}
ProductListView.Items.Add(Item);
}
if the size in stock the subitem color change to green and if the size is out of stock the subitem color will change to red
thanks