-
20 Nov 2012 1:00 PM #1
Unanswered: How to get value of a combobox in a proxy store?
Unanswered: How to get value of a combobox in a proxy store?
I have a store that sends a parameter to my controller. When I define my store
I am not updating the store on combo selection. Or else I could have just added a listener on combo and updated the store.Code:proxy: { type: 'ajax', scope: this, url: 'My/GetData', extraParams: { parametervalue: Ext.getCmp('Combo').getValue() //something similar } }
I want to get the value of the combobox when the grid is loaded. It also works with paging, so when the user hits next page the store loads the second page "with" the selected value in the combobox, which it passes to my controller.
-
22 Nov 2012 6:22 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 34,107
- Vote Rating
- 453
- Answers
- 3157
So the store is already created so the getValue is going to happen too soon correct? You could have a beforeload event listener to add in a param.
Or when the change event fires on the combo, add that value to the extraParams of the store.Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
22 Nov 2012 12:41 PM #3


Reply With Quote