Advertisement
digioz

MVC Grid View

Oct 30th, 2012
3,137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 0.25 KB | None | 0 0
  1. @model IEnumerable<GridTest1.Models.Person>
  2. @{
  3.     ViewBag.Title = "People";
  4.     WebGrid grid = new WebGrid(Model);
  5. }
  6. <h2>People</h2>
  7. @grid.GetHtml(columns: new [] {
  8.     grid.Column("ID"),
  9.     grid.Column("FirstName"),
  10.     grid.Column("LastName")
  11. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement