PDA

View Full Version : Dynamic grid paging



sencha.user
13 Dec 2012, 6:32 AM
Hi,

I am using dynamic grid using this plugin,
http://www.sencha.com/forum/showthread.php?242594-Dynamic-grid-with-dynamic-model

I want to make paging in it,

I tried like,

pageSize: 10,
proxy: {
type: 'rest',
url: me.url,
reader: {
type: 'dynamicReader',
totalProperty: 'totalCount'
}
}
})
});

me.bbar = Ext.create('Ext.PagingToolbar', {
store: me.store,
displayInfo: true,
displayMsg: 'Displaying topics {0} - {1} of {2}',
emptyMsg: "No topics to display"
});
in DynamicGrid,js.

totalProperty is not working. Am I setting the property properly there?

Thanks in advance!

sencha.user
14 Dec 2012, 12:03 AM
Can someone help?

sencha.user
17 Dec 2012, 2:29 AM
No one can help me? :s.

tvanzoelen
18 Dec 2012, 3:52 AM
I am not very familiar with paging. If you use it with an external plugin from the ux, you should probably address the creator of that plugin with this problem.

But whats the problem? Is te store loaded? Did you do a store.loadPage(1) to retrieve the first records?

sencha.user
18 Dec 2012, 4:05 AM
Hi,

Thanks for the reply :), if you see that plugin and compare with my edit in it, I have just added properties for paging and from what I have seen, totalProperty isn't working, I don't know how I have to set it :-/.

tvanzoelen
18 Dec 2012, 4:11 AM
Is the totalProperty at the rootlevel of the returned json? Else try rootname.totalCount

tvanzoelen
18 Dec 2012, 4:12 AM
You can see user comments on that here http://docs.sencha.com/ext-js/4-1/#!/api/Ext.data.reader.Json at propety totalCount.

sencha.user
18 Dec 2012, 4:30 AM
The totalProperty is at root level only, my JSON response,


{"totalCount":"25764","root":[{"name":"test","department":"ERP"..

I am not sure whether I am setting that property properly there :-|.