我是jtable的新手。今天我尝试用来自服务器的数据设置我的网格。但是当我打电话时
jtable('load')
我在浏览器中看到200个结果,而我的json是正确但jtable返回错误弹出:
字段的命名方式与json相同。有人知道它有什么问题吗?
谢谢!
答案 0 :(得分:0)
解决。回应应采用以下格式:
{
"Result":"OK",
"Records":[
{"PersonId":1,"Name":"Benjamin Button","Age":17,"RecordDate":"\/Date(1320259705710)\/"},
{"PersonId":2,"Name":"Douglas Adams","Age":42,"RecordDate":"\/Date(1320259705710)\/"},
{"PersonId":3,"Name":"Isaac Asimov","Age":26,"RecordDate":"\/Date(1320259705710)\/"},
{"PersonId":4,"Name":"Thomas More","Age":65,"RecordDate":"\/Date(1320259705710)\/"}
]
}