?
Solved

Gridview in MVC 4

Posted on 2015-01-16
2
Medium Priority
?
354 Views
Last Modified: 2015-01-29
Hi All,

I am developing a website using  visual studio 2013, MVC 4 and entity framework. I want to fill the grid view from database. How can i achieve this?

Please let me know the sample source code with best practices.

Thanks in advance
0
Comment
Question by:Jatin Nahar
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 36

Accepted Solution

by:
Miguel Oz earned 1500 total points
ID: 40555631
For ASP.NET MVC Razor you can use WebGrid: (Gridview is more for Web forms)
Link 1: Webgrid using EF
http://dotnetawesome.blogspot.com.au/2014/04/how-to-display-database-data-in-webgrid-in-mvc4.html
Link 2: some Webgrid  tricks like custom columns, paging and sorting
http://msdn.microsoft.com/en-us/magazine/hh288075.aspx
0
 

Author Closing Comment

by:Jatin Nahar
ID: 40579158
good
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question