Using jqGrid with JsonResult in ASP.NET MVC 3
I have been working on an ASP.NET MVC 3 project with a C# backend, and I wanted to get a grid going that had grouping capabilities. I came across jqGrid and decided to give it a try. I discovered a blog post which got me close, but it still took a bit of doing. It turned out to be a pain, but I managed to get basic data display working (I'll try to update this post when I get grouping working). I decided to post the code because it wasn't straightforward, and all of the other blog & forum posts on the topic didn't quite have a complete solution. The code has a bit more detail than is necessary for this post, but I hope it is useful. Here is my HTML... My javascript looks like this... There are a couple things to note. Line 3: The url attribute. It took a bit of trial & error to figure out this url format for my controller method. "Asset" is the controller (my actual controller name is "AssetController"), and "GetGridConten...