Forum /
Ext JS 2.x - Unsupported /
Ext 2.x: Help & Discussion /
Grid, data store and paging
Grid, data store and paging
1. Does the dataStore>-limit must be equal to the bbar->pageSize ?
2. How can I load according to the dataStore>-limit but show according to thebbar->pageSize ?
gridStore.load({
params:{start:0, limit:100 },
callback: function( r, options, success){
grid.getSelectionModel().selectFirstRow();
}
});
bbar: new Ext.PagingToolbar({
pageSize: '10 ',
store: gridStore,
//displayInfo: true,
displayMsg: 'Displaying {0} - {1} of {2}',
emptyMsg: "No candidates"
}),
Thanks
Sencha - Community Support Team
page size is how many records per page. so 10 would equal 10 records per one page.
Don't manage limit, let the paging toolbar do that.
Let me be more clearly, I want to load the all data (100 records) and do local sort, but in the same showing only 10 records (paging).
1. How do I load the entire data with the dataSort ? should I use:
reader: new Ext.data.JsonReader({
root: 'candidates',
totalProperty : 100
2. shuld I just load the data each time without the limit param ?
gridStore.load({
//params:{start:0, limit :total_count},
callback: function( r, options, success){
grid.getSelectionModel().selectFirstRow();
}
});
Thanks for your help
pagesize and limit are basically the same, how many records are shown per page.
You want to grab all records at once and store that data locally and then page through I take it. To do that you need to use an extension, paging memory proxy . Search and ye shall find (easily).
What about the totalProperty ?
reader: new Ext.data.JsonReader({
root: 'candidates',
totalProperty : 100
Read the API it tells you what it is:
http://extjs.com/deploy/dev/docs/?cl...=totalProperty
There's an example at top of page even?
Sencha is used by over two million developers. Join the community, wherever you’d like that community to be
or Join Us