extjs5 - ExtJS Paging Grid will not advance -


i trying implement grid paging toolbar in extjs 5. first page of data, when advancing grid not update new data.

it appears data.asp page not being updated new starting value update .absoluteposition property of recordset. grid keeps displaying 1st page of information.

my code below...

    var gridstore = ext.create('ext.data.jsonstore', {          autoload: false,          fields: [              {name: 'field1', type: 'int'},              {name: 'field2', type: 'int'}          ],          pagesize: 25,          proxy: {               type: 'ajax',                url: 'data.asp',               reader: {                    type: 'json',                    rootproperty: 'rows',                    totalproperty: 'totalcount',               }          }     });      gridstore.load({          params: {                start: 0,                limit: 25          }     });      grid = ext.create('ext.grid.panel', {         renderto: 'grid-spec',         store: gridstore,         columns: [             {text: 'field 1', width: 10, sortable: true, dataindex: 'field1'},             {text: 'field 2', width: 10, sortable: true, dataindex: 'field2'}         ],         height: 100,         width: 20,         selmodel: { mode: 'single' },         dockeditems: [{             xtype: 'pagingtoolbar',             store: gridstore,             dock: 'bottom',             displayinfo: true         }]     }); 

your code has typos, in general looks ok.

problem may lay on server side - when using ajax proxy, must implement paging on server side. if have implemented paging on server side, use developer tools (for example in chrome) , see if page number submitted correctly. should see start/page number in address (eg: http://fiddle.jshell.net/echo/json/?_dc=1410854522824&page=2&start=5&limit=5).

i made fiddle: http://jsfiddle.net/seur2alx/9/ can compare code mine (note ext.ux.data.reader.json there fake data grid).


Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

visual studio 2010 - Connect to informix database windows form application -

android - Associate same looper with different threads -