as the title says, I'm trying to group a selection by it's distinct values, and then iterate through the result to populate a listView of checkboxes, my code is below
var checkBoxAdd =
from sale in saleData
orderby sale.City.ToList()
group sale.City by sale.City.Distinct() into cityDistinct
select cityDistinct;
foreach (House s in checkBoxAdd)
{
listViewCities.Items.Add(s.City.ToString());
}
I am getting the following error:
Can anyone help me out with this please
>>. The groups is the first list and the last two are the rows and columns of a table.
– jdweng Oct 11 '17 at 19:34