私はPHP配列($ test_arr)を以下のようにしています
Array
(
[0] => Array
(
[INV_ID] => 1
[INV_TYPE_ID] => CART
[INV_NO] => CPI0000001
[INV_DATE] => 17-DEC-12
)
[1] => Array
(
[INV_ID] => 2
[INV_TYPE_ID] => CART
[INV_NO] => CPI0000002
[INV_DATE] => 17-DEC-12
)
)
そして、私はこの配列のデータストアを持っています
vertStore = new Ext.data.JsonStore
({
autoLoad: false,
mode: 'local',
data: <?php echo $test_arr; ?>,
fields:
[
'INV_NO',
'INV_DATE'
]
});
私のグリッドパネル
testPanelUi = Ext.extend(Ext.Panel, {
width: 400,
height: 250,
initComponent: function() {
this.items = [
{
xtype: 'grid',
title: 'ccccc',
ref: 'test_ref',
id: 'panel_id',
columns: [
{
xtype: 'gridcolumn',
dataIndex: 'INV_NO',
header: 'INV NO',
sortable: true,
width: 100,
editable: false,
id: 'inv_no_id'
},
{
xtype: 'gridcolumn',
dataIndex: 'INV_DATE',
header: 'Date',
sortable: true,
width: 100,
editable: false,
id: 'date_id'
}
]
}
];
testPanelUi.superclass.initComponent.call(this);
}
});
ストアをグリッドにロードする
this.test_ref.store = vertStore;
しかし、このグリッドは配列の最初のデータセットのみを表示します(配列内のインデックス0のデータセットとグリッドは1行のみを表示します)。グリッド内のすべてのデータを表示するにはどうすればよいですか?