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
Loading
ali tuncerPosted Aug 25, 2016, 2:40 AM
Have you tried converting to list?
http://stackoverflow.com/questions/755826/convert-iqueryable-type-object-to-listt-type