Accepted answer

Use the ToList() extension method to convert the query to a list of items.

GridView1.DataSource = q.ToList();

This will also have the effect of running the query at the time of conversion, so you may want to see if just casting to IEnumerable would work.

Edit: to clarify based on the comment trail. The issue turns out to be with the construction of the SPROC and the inability of LINQ to detect the return value. Changing the SPROC as per Stored Procedure & LINQ, Dmbl File unable to interpret the result set allowed LINQ to detect the schema after which the SPROC could be changed back.

Related Articles