prebenbo
7 Jan 2010, 11:21 AM
I'm loading json data using JsonReader into a grid panel. Somehow there is two requests to the server - one with the default start and limit options (0 and 25), and a second for my specified start and limit options (0 and 100). Well, the code actually works - but is a bit "annoying" to see the loading of data is done twice on the initial request.
The javacode as follows:
var grid = new Ext.grid.GridPanel({
plugins: [ { ptype: 'ux-grid-metagrid' }, ],
store: {
autoLoad: {params:{start: 0, limit: 100}},
autoDestroy: true,
remoteSort: true,
reader: new Ext.data.JsonReader(),
proxy : new Ext.data.HttpProxy({
method: 'GET',
url: "?factory=db&menu=channel&channel=" + channel + "&json=1"
})
},
border: false,
stripeRows: true
});
The javacode as follows:
var grid = new Ext.grid.GridPanel({
plugins: [ { ptype: 'ux-grid-metagrid' }, ],
store: {
autoLoad: {params:{start: 0, limit: 100}},
autoDestroy: true,
remoteSort: true,
reader: new Ext.data.JsonReader(),
proxy : new Ext.data.HttpProxy({
method: 'GET',
url: "?factory=db&menu=channel&channel=" + channel + "&json=1"
})
},
border: false,
stripeRows: true
});