DEV Community

Robin van der Knaap
Robin van der Knaap

Posted on • Originally published at Medium on

Update jqGrid Html helper for ASP.NET MVC

We released a new version of MvcJqGrid, a fluent html helper which eases the the implementation of jqGrid in ASP.NET MVC applications. I’ll give a short description of the most notable changes in this article. Source code and documentation are hosted on github. We included a sample application in the source code, a live example can be found here.

Razor engine support

Although it was possible to use the previous version with the razor engine, it wasn’t quite obvious how. The following gives you a basic example how to use the new version of MvcJqGrid with the razor view engine:

NuGet

MvcJqGrid is now available as a NuGet package which makes installing the helper a trivial task:

install-package MvcJqGrid

You have to install jqGrid and jQuery yourself, we decided not to include these as dependencies.

Modelbinder

We included the jqGrid modelbinder created by Ilya Builuk. The modelbinder makes it easy to handle data requests from the grid in your controllers:

Sample Application

The sample application was also updated. The sample is included in the source code, you can find a live example here. The sample application is a nice way to get started with the helper, because for every sample grid the source code is displayed below the grid.

One word about the sample data being used. The sample data is contained in a Sql Express Database in the App_Data folder. Make sure you have installed Sql Server Express 2008 R2. The Web Platform Installer sometimes indicates you have installed R2 when actually you only have SP2 installed. More info on StackOverflow.

Unit tests

Daan le Duc went out of his way and added 129 unit tests to the project, which improved the overall quality of the Html Helper.

Hopefully, you’ll like this new release. Suggestions, questions and comments are always welcome.

Top comments (0)