Sunday, April 11, 2010

JqGrid doesn't work in ASP.NET MVC2

Programmer Question

I have a project in ASP.NET MVC1 using VB.NET controlers and JqGrid. it works fine under MVC1. After migrating the project to ASP.NET MVC2, the grid is no longer populated. It seems that there is some new restrictions on returned Jsonresult in MVC2. How to solve this in VB.NET. Controler function populating the jqgrid is something like this :



Function GetGridRecordset(ByVal qry As String) As JsonResult
Dim result = New JsonResult()
...
...
Return result
End Function


Is there anyone who have a solution?



Find the answer here

1 comment:

  1. Make sure that you added the JsonRequestBehavior param.

    return Json(jsonData, JsonRequestBehavior.AllowGet);

    ReplyDelete

LinkWithin

Related Posts with Thumbnails