PDA

View Full Version : {SOLVED} combobox store lastOptions does not work with pager



issc
18 Jan 2011, 1:43 AM
SOLVED

Hello,

We are using a lot of grids and comboboxes on our form with paging.
One combobox is loaded with a list of official or unofficial data depending on a selection.
We are using a pageSize of 100 on the combobox and using the reload function to load the data if the user changes the value to official or unofficial.

this.comboOffData.store.reload({ params: { officialList: true, filter: '', start: 0, limit: 100} });
this.comboOffData.store.reload({ params: { officialList: false, filter: '', start: 0, limit: 100} });

But if the user clicks on the next button of the pager the store is loaded with default data and not using the lastOptions.
Firebug results:

Loading at startup
{"officialList":true,"filter":"","start":0,"limit":100,"sort":"","dir":"ASC"}

Changing value to unofficial
{"officialList":false,"filter":"","start":0,"limit":100,"sort":"","dir":"ASC"}

Clicking the next button of the pager
{"start":100,"limit":100,"sort":"","dir":"ASC","filter":"","officialList":true}

What can we do so that the pager is using the lastOptions that we set to reload the store?!

Thanks!

Sascha
PS: We are using 3.1.1 of Ext JS