开发者

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

开发者 https://www.devze.com 2023-01-16 23:55 出处:网络
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

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

精彩评论

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