siva nagarjuna

siva nagarjuna

  • NA
  • 26
  • 17k

How can I bind the IQueryable data to the asp gridview?

Aug 25 2016 2:33 AM
i want to bind the IQueryable data to the asp gridview<br /> <br /> Here is my code from the controller page. please check it<br /> <br /> <strong>What I have tried:</strong><br /> <br /> public IQueryable Data()<br /> {<br /> NorthwindDataContext db = new NorthwindDataContext();<br /> var a = db.OrdersViews;<br /> return a;<br /> }<br /> <br /> <br /> 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.<br /> <br /> Please note I don't need an IEnumerable type but I need just IQueryable data to bind for the grid.<br /> <br /> Anybody please help me on this query<br /> <br /> Thanks in advance

Answers (1)