matt
matt

Reputation: 320

Sencha Touch 2 Pagination Plugin Record Count

When using the ListPaging plugin, how do you set the total number of records or signal to the plugin that all records have been loaded?

Upvotes: 1

Views: 1449

Answers (2)

matt
matt

Reputation: 320

Returning the variable "total" with my json feed is all i needed to do. if i were returning an array of names ["bob","jim","mark"], i need to return {"names":[...], "total": 3} then set my rootProperty to "names" in the reader property of my store's proxy.

http://docs.sencha.com/touch/2-0/#!/api/Ext.data.reader.Json-cfg-rootProperty

Upvotes: 1

Titouan de Bailleul
Titouan de Bailleul

Reputation: 12949

I found this in the documentation :

http://docs.sencha.com/touch/2-0/#!/api/Ext.plugin.ListPaging-cfg-noMoreRecordsText

You might want to take a look at the source code for this, to know how Sencha handle it.

Hope this helps

Upvotes: 1

Related Questions