Solved

Gridview in MVC 4

Posted on 2015-01-16
2
304 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
This video discusses moving either the default database or any database to a new volume.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

762 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now