Can We Use Gridview in Mvc

In web application, displaying data in a gridview is a common requirement. Hence, we will walkthrough possible ways of designing grid view in ASP.NET

How can use data grid view in ASP.NET MVC?

  1. Open Visual Studio 2010, Go to the New Project – Visual C#, Web, then ASP.NET MVC Web Application and click OK.
  2. After Clicking OK, New ASP.NET MVC5 Project window will open and there you have to choose MVC and press OK.

How can we retrieve data from database and display in GridView in MVC?

  1. public ActionResult GetDetails()
  2. {
  3. var data = DB. tblStuds. ToList();
  4. return PartialView(data);
  5. }
Chloe Bennett

Chloe Bennett

Culture, Media & Entertainment Columnist

Chloe Bennett explores the intersection of pop culture, streaming entertainment, digital trends, and contemporary lifestyle. Her weekly commentary reaches thousands of culture enthusiasts.

Share this article
Twitter Facebook Pinterest