PDA

View Full Version : Sample code for remote filtering of grid with pagination in extjs4.1



DineshGudikandula
20 Feb 2013, 7:49 AM
Hi All,
In my project i want remote filtering with pagination. I have gone through the example specified in http://docs.sencha.com/ext-js/4-1/#!/example/grid/infinite-scroll-with-filter.html. It is fine for filtering the content. To this particular code i added the following :

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

It is adding one paging tool bar to my app, but when am filtering the pagecount is not decreasing.

Can anybody please provide me the sample code for this example otherwise guide me where am missing so that after filtering page count not decreasing.

Any help is highly appreciated.


Thanks
Dinesh

scottmartin
20 Feb 2013, 11:37 AM
Is your response JSON sending back the correct totals when filtering?

Scott.

DineshGudikandula
20 Feb 2013, 9:08 PM
Hi Scott,

Initially when am searching the count is coming fine as per the requirement. For example if am searching "How to" it is showing 10 pages (initially 134 page), but when am clicking on the next button from the paging toolbar, it is loading all the data, and total pagecount became 134 again.


Thanks
Dinesh

scottmartin
21 Feb 2013, 5:18 AM
When you select next, is your filter sent in the header? Or just when you initially set filter?

Scott.