I think you need to do ToList() when added to a DataSource :
ProductDBEntities db = new ProductPDBEntities(); var pro = from u in db.Products where u.PID == 1 select u; if (pro != null) { GridView1.DataSource = pro.ToList(); GridView1.DataBind(); }
Note. Since this is a GridView , you need to take n number of rows. No row limit .
source share