View grid in mvc6

How to add a grid to MVC-6?

I would like to use webgrid to list the details. Is it possible to use System.Web.Helpers as a namespace. But I do not support him

+5
source share
4 answers

This project can meet your requirements, a simple grid control for ASPNET MVC (using Razor): MVC6.Grid.Web

+1
source

You can also try NetCoreControls .

Built specifically for .NET MVC Core. The grid control is server-side, uses AJAX, and supports swap, filter, and events.

Check out the documentation and demo website.

0
source

You can use the Shield interface for the core core of the NuGet package and integrate it with the free Shield UI Lite through Bower or the commercial Shield user interface set.

Their grid widget is awesome!

0
source

I would suggest using jqGrid (or maybe some other network of java scripts). From the MVC, return an ActionResult as a JSON object

public ActionResult UserList() { object userListData = null; try { List<UserListViewModel> users = 'your code to get the user list' userListData = new { page = 1, records = users.Count, rows = users }; } JavaScriptSerializer serializer = new JavaScriptSerializer(); serializer.MaxJsonLength = int.MaxValue; return new ContentResult() { Content = serializer.Serialize(userListData), ContentType = "application/json", }; } 

and call it on the load / jQuery page document Get ready for things like this.

  $("#userTable").jqGrid({ url: '../User/UserList, mtype: 'GET', datatype: "json", autowidth: true, colNames: ['Id', 'First Name', 'Last Name'], colModel: [ { name: 'Id', key: true, hidden: true, fixed: false, shrinkToFit: false, align: 'left' }, { name: 'FirstName', fixed: false, shrinkToFit: false, align: 'left' }, { name: 'LastName', fixed: false, shrinkToFit: false, align: 'left' } ], 

for more information about jqGrid, see the demo version of http://jqgrid.com/

-2
source

All Articles