PDA

View Full Version : store not limiting values



zeeshanjeelani
25 Feb 2013, 4:08 AM
Hi I am using a store with the limit of 10 records




var store = Ext.create('Ext.data.JsonStore', {
model: 'mdbunit',
id:'store',
pageSize:10,
proxy: {
type: 'ajax',
searchall: true,
url: 'php/viewbunit.php',
reader: {
type: 'json'
}
},


listeners : {
load : function(store) {

if(store.getCount()>0)
{
Ext.getCmp('bunit').enableBtns();

}
else{
Ext.getCmp('bunit').disableBtns();
}
}
}
});




store.load({
params:{
start:0,
limit: 10
}
});





and paging toolbar





id:'gpanelBunit',
dockedItems: [{
xtype: 'pagingtoolbar',
store: store, // same store GridPanel is using
dock: 'bottom',
displayInfo: true,


}],





Still Store loads all the records and if i click paging toolbar next button same records being loaded to the page 2


Thanks

willigogs
25 Feb 2013, 6:58 AM
This sounds more like an issue with your server-side code.

If you send the limit of "10", then your server side code interrogate this, and only return 10 records...

(FYI - your code also looks like you're using EXT4, and this is the EXT3.x forum)