and thanks in advance for assistance with this issue.
I have a extjs 4.1 grid , populated with json loaded from the server. Paging is remote and each hunk of 25 items is served up properly from the server as valid json with the proper value in the totalProperty. Everything functionally works fine as far as loading and paging goes, there is just no page number in the paging bar. It looks like this. ok...Im not allowed to post an image...so here is a link it looks like this
here is the relevant code. I can post additional code if it would help troubleshoot.
var theStore = Ext.create('Ext.data.Store',
{
model: 'SearchResult',
pageSize: 25,
remoteSort: true,
proxy:
{
type: 'ajax',
url: '/Search/SubmitSimpleQuery',
reader:
{
type: 'json',
root: 'Results',
totalProperty: 'totalHits'
},
extraParams:
{
searchText: theSearchText,
beginDate: theBeginDate,
endDate:theEndDate,
collectionMatch:theCollection
}
}
});
theStore.load();
var grid = Ext.create('Ext.grid.Panel',
{
store: theStore,
width: '100%',
height: '100%',
columns:
[
{
text: 'Title',
dataIndex: 'title',
width: '60%'
},
{
text: 'Published Date',
dataIndex: 'pubDate_ymd',
renderer: renderDate
},
{
text: 'Released Date',
dataIndex: 'releaseDate_ymd',
renderer: renderDate
},
{
text: 'From',
dataIndex: 'from',
hidden: true
},
{
text: 'To',
dataIndex: 'to',
hidden: true
}
],
dockedItems: [
{
xtype: 'pagingtoolbar',
dock: 'bottom',
store: theStore,
displayInfo: true,
displayMsg: 'Displaying results {0} - {1} of {2}',
emptyMsg: 'No results'
}]
});
Ext.create('Ext.panel.Panel',
{
bodyPadding:25,
width:'100%',
renderTo:Ext.getBody(),
items:[
grid
]
});
the totalproperty is coming in via he json correctly - for example 108 which results in 5 pages. all paging works. when paging to page 2, page:2 , start:25, limit: 25
are all passed to the server, so ext knows what page it is, but its not getting into the current page box. do I need to then set that page value to a property on the proxy or store?
Im stumped and Ive been banging my head against this one for a while.
thanks.
btw, this is a similar problem ExtJS grid panel not showing page number but it was (apparently?) fixed adding the paging bar to dockeditems on the grid, which as you can see above is already the case.