2010-09-16 17 views

回答

0

我發現了一個類似的問題,並在帖子的評論中回答。

改變這樣的代碼,如果你使用 ASP.NET MVC 2

返回JSON(model.ToJqGridData(頁, 行,空,搜索,新的[] { 「IntProperty」,「 StringProperty「, 」DateProperty「}), JsonRequestBehavior.AllowGet); }

注:HomeController.cs

那麼,你又需要改變在控制器的動作返回JSON對象如下面的代碼。

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

我沒有測試這個。請確認是否有幫助!

+0

這正是我們需要得到他的演示作品! – 2010-09-17 05:10:25