开发者

How to get rid of empty data in Craig Stunz's demo application?

I download Craig Stunz开发者_开发技巧's demo application from his blog and run it from Visual Studio 2010. The result is the grid with its UI but no rows. What should I do to make it works?


I found a similar question and it was answered in the comments of the post.

Change the code like this if you used ASP.NET MVC 2

return Json(model.ToJqGridData(page, rows, null, search, new[] { "IntProperty", "StringProperty", "DateProperty" }), JsonRequestBehavior.AllowGet); }

NOTE : HomeController.cs

So, again you need to change the code in the controller's action that return the Json object as below.

return Json(
  model.ToJqGridData(
    page, rows, null, search, 
    new[] { "IntProperty", "StringProperty", "DateProperty" }),
    JsonRequestBehavior.AllowGet
);

I didn't test this. Please confirm if that helps!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜