【发布时间】:2013-02-19 12:22:30
【问题描述】:
我有一个这样的 json 响应
{
"listResponse":
{
"page":0,
"rows":10,
"total":9,
"items": [
{ "abbr": "ec", "name": "Ecuador", "capital": "Quito" },
{ "abbr": "eg", "name": "Egypt", "capital": "Cairo" },
{ "abbr": "sv", "name": "El Salvador", "capital": "San Salvador" },
{ "abbr": "gq", "name": "Equatorial Guinea", "capital": "Malabo" },
{ "abbr": "er", "name": "Eritrea", "capital": "Asmara" },
{ "abbr": "ee", "name": "Estonia", "capital": "Tallinn" },
{ "abbr": "et", "name": "Ethiopia", "capital": "Addis Ababa" }
]
}
}
我需要使用 dojo data.ItemFileReadStore 来执行。我用过
var layout4 = [{
field: 'abbr',
name: 'Abbr',
width: '200px'
},
{
field: 'name',
name: 'First Name',
width: '200px'
},
{
field: 'capital',
name: 'Capital',
width: '200px'
}
这是行不通的。请帮助,在此先感谢
【问题讨论】:
-
您实际尝试过什么?使用
ItemFileReadStore的代码在哪里? “不工作”是什么意思?您一直在关注哪些文档?你用的是哪个版本的道场? -
我尝试使用带有 json 响应的 dojo 创建网格
-
您需要发布足够的信息,以便其他人能够重现您的问题。你还没有这样做!就像我在问你:你能帮我去图书馆吗?
标签: json dojo dojox.grid