Not showing the last page PagingToolBar + Grid
Basically I have 15 items in my database that I am using this grid for pagination on. I created my paging toolbar and gridpanel, with a pagelimit of 2 items. So each page would have 2 items on it. My issue comes to when I hit page 8, I get this json back.
{COUNT:15,"ROWSET":{"ROW":{"BUSINESSID":15,"BUSINESSNAME":"tar15"}}}
on page 7 I get this json back
{COUNT:15,"ROWSET":[{"BUSINESSID":13,"BUSINESSNAME":"tar13"},{"BUSINESSID":14,"BUSINESSNAME":"tar14"}]}
with page 8, it is blank instead of the expected 1 row item, while page 7 has both items listed
now for code
Code:
this.customStore = new Ext.data.JsonStore({
totalProperty: 'COUNT',
root: 'ROWSET',
url: "...aspx",
fields: [
{ name: 'BUSINESSID' },
{ name: 'BUSINESSNAME' }
]
});
var myref = this.customStore;
// in the grid.... bbar
new Ext.PagingToolbar({
pageSize: 2,
store: this.customStore,
displayInfo: true,
displayMsg: 'Displaying Businesses {0} - {1} of {2}',
emtpyMsg: "There are no Businesses to display"//,
//local: true
})
//in the on render....
this.customStore.load({ params: { start: 0, limit: 2} });
ugh found it, kinda, bad json ;p