Solved

Gridview in MVC 4

Posted on 2015-01-16
2
307 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
2 Comments
 
LVL 35

Accepted Solution

by:
Miguel Oz earned 500 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

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.
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

809 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