0

我在 JQGrid 中使用了一些本地定义的 JSON 数据。我的数据如下所示:-

{"total_rows":1662,"offset":0,"rows":
    [
    {"id":"338b79f07dfe8b3877b3aa41a5205e75","key":"2004-03-05T03:59:00+00:00","value":             {"date":"2004-03-05T03:59:00+00:00","signature":"sig1","name":"name1"}},
    {"id":"338b79f07dfe8b3877b3aa41a540cf58","key":"2004-03-05T03:59:00+00:00","value": {"date":"2004-03-05T03:59:00+00:00","signature":"sig2","name":"name2"}},
    {"id":"338b79f07dfe8b3877b3aa41a566ca42","key":"2004-03-05T03:59:00+00:00","value": {"date":"2004-03-05T03:59:00+00:00","signature":"sig3","name":"name3"}},
    {"id":"15add79dd3efec4f34786d5f6a33ec5c","key":"2004-07-26T14:03:00+00:00","value"  :{"date":"2004-07-26T14:03:00+00:00","signature":"sig4","name":"name4"}}
    ] 
}

我的 JQGrid 定义如下所示:

 datatype: "local",
            height: 100,
            colNames:['key', 'signature', 'name'],
            colModel:[
                {name:'key',index:'key', width:80}
                {name:'value.signature',label:'Signature', width:100, align:"right"},
                {name:'value.name',index:'name', width:80}

            ],

            caption: "Load Once Example"

但是,value.signature 和 value.name 字段的列始终为空白。

任何指针将不胜感激!

4

1 回答 1

0

好的 - 在这里找到了答案

工作完美!

于 2012-10-02T00:29:32.463 回答