
To avoid this error use below code:
- GVEmployee.DataSource = (from em in context.Employee
- select new { em.Emp_ID, em.Name, em.City,
- em.Country, em.State }).ToList();
- VEmployee.DataBind();
While binding Grid View with Entity Framework got this error.

Join the conversation! Your thoughts help the community grow.
Join to leave a comment
Members earn 10 SHARP for a comment, 10 SHARP for a reaction, and 250 SHARP for every blog they publish.
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegisterMembers onlyeBook · .NETCQRS Design Pattern with MediaRDownload nowWrite a blog post and earn +250 SHARP when it is approved.
Write a blog
Gowtham RajamanickamTOP 100Posted Mar 12, 2015, 10:06 PM EDT
Good one...