i want to bind the IQueryable data to the asp gridview
Here is my code from the controller page. please check it
What I have tried:
public IQueryable Data()
{
NorthwindDataContext db = new NorthwindDataContext();
var a = db.OrdersViews;
return a;
}
And in the index.cshtml page i have used selectMethod to call the method from the controller. I have tried a lot but I can't able to achieve this.
Please note I don't need an IEnumerable type but I need just IQueryable data to bind for the grid.
Anybody please help me on this query
Thanks in advance
How can I bind the IQueryable data to the asp gridview?
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

ali tuncerRank #1,499 · 1.1K reputationPosted Aug 24, 2016, 10:40 PM EDT
Have you tried converting to list?
http://stackoverflow.com/questions/755826/convert-iqueryable-type-object-to-listt-type