i'm new with extjs4, i have a problem with gridpanel that should be show number of rows from data store. My problem is data store retrieve json with 6 rows but why in grid panel only shows 4 rows...
here's the grid
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,
});
here's the store
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'
}
}
});
and json return 6 rows that unique. why only show 4 rows...
{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"
}
]
}
is anybody can explain to me???please. thanks
You can't have items with a duplicate id in your store, they must be unique.