load - Why isn't my ExtJS GridPanel paying attention to the limit parameter? -


i have jsonstore:

var store = new ext.data.jsonstore({         root: 'data.items',         remotesort: false,         fields: ['clocktime', 'empid'],         proxy: new ext.data.httpproxy({             url: approotpath + 'something/getsomething',             method: 'post'         })//proxy });//new ext.data.jsonstore 

i call load on store following:

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

i have grid display data in:

    var grid = new ext.grid.gridpanel({     store: store,     title:'employees',     stateful: true,     id: 'grid',     striperows: true,     stateid: 'excp_list',     bbar: new ext.pagingtoolbar({         store: store,                displayinfo: true,         prependbuttons: true,         emptymsg: "no records display",         pagesize: 25     }),     viewconfig: {         forcefit: true     },     columns: [         {header: "emp id", width: 40, dataindex: 'empid', sortable: true},         {header: "clock time", width: 40, dataindex: 'clocktime', sortable: true}     ]  }); 

i expected display 25 records/rows per page. displays 1 page total 160 records on page. missing obvious here?

you missing totalproperty store/jsonreader. should total number of records, paging toolbar needs know calculate number of pages, etc. server needs send correct page , total result count. looks server sending records , ignoring start , limit parameters.


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -