Boa Noite,
Não estou conseguindo paginar os meus resultados, os dados aparecem perfeitamente , quando tento paginar não retornar nenhum registro e o mesmo acontece quando clico para dar um reload no grid, os dados somem, abaixo o codigo para tentarem me ajudar… obrigado.
Ext.onReady(function(){
var COL = Ext.data.Record.create([
{name: 'email', type: 'string'},
{name: 'tipo', type: 'string'},
{name: 'id'}
]);
// create the Data Store
var store = new Ext.data.Store({
proxy: new Ext.data.HttpProxy({
url: 'http://127.0.0.1:8080/comercial/emailsXML''}),
reader: new Ext.data.XmlReader({
record: 'row',
totalProperty: 20
}, COL),
sortInfo:{field:'email', direction:'ASC'}
});
// create the grid
var grid = new Ext.grid.GridPanel({
store: store,
trackMouseOver:false,
disableSelection:false,
loadMask: true,
columns: [
{header: "ID", width: 50, dataIndex: 'id', sortable: true},
{header: "EMail", width: 300, dataIndex: 'email', sortable: true},
{header: "Tipo", width: 180, dataIndex: 'tipo', sortable: true}
],
renderTo:'grid-example',
title: 'Emails',
stripeRows: true,
width:540,
height:200,
bbar: new Ext.PagingToolbar({
pageSize: 10,
store: store,
displayInfo: true
})
});
store.load({params:{start: 0, limit: 15}});
});
