我是 extjs4 的新手,我遇到了 gridpanel 的问题,应该显示数据存储中的行数。我的问题是数据存储检索 json 有 6 行但为什么在网格面板中只显示 4 行...
这是网格
Ext.create('Ext.grid.Panel', {
id: 'gridcb',
store: Ext.data.StoreManager.lookup('mystore'),
columns: [
{header: 'ci', dataIndex: 'co'},
{header: 'co', dataIndex: 'co', flex:1},
{header: 'durasi', dataIndex: 'durasi'},
{header: 'issue', dataIndex: 'id'}
],
height: 200,
width: 400,
});
这是商店
var mystore = Ext.create('Ext.data.Store', {
storeId:'mystore',
fields:['ci', 'co', 'durasi', 'id'],
proxy: {
type: 'ajax',
url : 'exe_report_issue_order.php?function=store',
actionMethods : 'POST',
reader: {
type: 'json',
root: 'rows'
}
}
});
和 json 返回唯一的 6 行。为什么只显示4行...
{success:true,
rows:[{ "ci":"2012-04-17 17:13:48",
"co":"2012-04-17 17:13:59",
"durasi":"00:00:11",
"id":"154"
},
{"ci":"2012-04-26 08:05:00",
"co":"2012-04-26 10:00:00",
"durasi":"01:55:00",
"id":"157"
},
{"ci":"2012-04-26 13:00:00",
"co":"2012-04-26 17:00:00",
"durasi":"04:00:00",
"id":"158"
},
{"ci":"2012-04-17 13:00:00",
"co":"2012-04-17 17:00:00",
"durasi":"04:00:00",
"id":"65"
},
{"ci":"2012-04-18 08:00:00",
"co":"2012-04-18 10:00:00",
"durasi":"02:00:00",
"id":"65"
},
{"ci":"2012-04-18 17:45:00",
"co":"2012-04-18 22:00:00",
"durasi":"04:15:00",
"id":"65"
},
{"ci":"2012-04-18 23:30:00",
"co":"2012-04-19 03:30:00",
"durasi":"-20:00:00",
"id":"65"
}
]
}
有人可以向我解释吗???请。谢谢