Hello: I am working on a C# project that reads an XML file and returns a list of lists. When I want to display a list I do this:
IEnumerable<Foo> myFooQuery = from t in myLists.SelectMany( l => l.bar)
orderby t.StartTime descending
select t;
dataGridView1.DataSource = myFooQuery.ToList();
My problem is that when I do it that way, you can't click on the column header to sort the datagridview. I tried myFooQuery.AsQueryable(), but then nothing shows up in the datagridview even though the query count is what I expect. Am I just missing something obvious, or do I have to use .Tolist()?