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.
- Getting 'Data source is an invalid type' when binding Linq query to Gridview
- Getting "String or binary data would be truncated", when retrieving data via a LINQ query which uses CONTAINS
- Getting null data when executing LINQ to Entities query
- Getting result of Linq query after data binding a control without explicitly using .ToList() in ASP.Net
- Why does LINQ query throw an exception when I attempt to get a count of a type
- Duplicate Rows when Data Binding with LINQ to Entities
- Linq query to exclude from a List when a property value of List of different type are equal?
- Getting an invalid cast exception when trying to order a list of objects with linq
- Is there any way to create a LINQ query as a variable without having the data source (yet)?
- What is the return type for a anonymous linq query select? What is the best way to send this data back?
- LINQ query performance issue when fetching data from db in MVC Razor
- Use a linq query as microsoft local report Data Source (WinForms)
- LINQ query returns old results when source list is re-initialized
- Convert Linq Data query to object type
- Getting the first result from a LINQ query - why does ElementAt<T>(0) fails when First<T>() succeeds?
- How can I build LINQ query when object type is not known at compile-time
- Error when defining a query param type List<int> inline using Linq
- "Argument data type ntext is invalid for argument 1 of upper function" when trying to add a third item to a filter
- Linq to Sql NotSupportedException "The explicit construction of the entity in a query is invalid" when selecting new Type of other Database Table
- Linq sub query when using a repository pattern with EF code first
- Getting Stack Overflow when performing Linq to Sitecore Query
- Using LINQ query result for data source for GridControl c#
- Getting weird behavior when retrieving data from Microsoft CRM using LINQ
- How to make zero counts show in LINQ query when getting daily counts?
- How do I write this crosstab type query in Linq (tables & data provided)
- How can I check the number of calls to the database in LINQ query when using .NET Core and Code First?
- Getting "Could not find an implementation of the query pattern for source type 'ExcelQueryable<T>'. " Error
- How to Select top (5) contributors group by Business type code in c# linq query
- Getting error:The entity or complex type cannot be constructed in a LINQ to Entities query
- LINQ entity data model generated code error - The type 'DBContexts.Category' already contains a definition for 'ID'
- Linq to sql - get value from db function and not directly from the db field (while mapping properties)
- Linq C# query for combining multiple ARRAY_CONTAINS into a list
- Entity framework not inserting values into nullable datetime field
- Want to find unique teams where individual is manager or member
- Is it possible to use Linq to group by changes in a series rather than simply by matching on a group item?
- LINQ Extract partial match from dataTable from list
- Is there a better way of calling LINQ Any + NOT All?
- SQL Server query returns OLD value, until restarting application
- Linq and DeleteAllOnSubmit pain
- Can you use LINQ or lambdas to perform matrix operations?
- The type arguments for method cannot be inferred from usage error
- How to get value from string expression
- Linq on List<object>
- Convert xml to custom class using lambda linq
- LINQ .FromSQL error InvalidOperationException: Sequence contains more than one matching element
- Joining & Transposing multiple Lists using LINQ
- What exactly is the point of Expression Trees?
- Get List of objects with duplicates C# linq
- Linq statement with stored procedure returning column value
- How can I use LINQ to calculate the longest streak?