-
4 Aug 2011 7:19 AM #1
ComboBox unique values
ComboBox unique values
Hello everybody,
I have a ComboBox with data coming from a JsonStore.
A sample of data is this:
If I use the column "Fiume" for my ComboBox, I have got 2 entries "Tevere". Is there a way to populate ComboBox and show only unique values?Code:var datiCombo = [ {"Fiume":"Chiascio","Comune":"Gubbio"}, {"Fiume":"Tevere","Comune":"Perugia"}, {"Fiume":"Tevere","Comune":"Roma"}, ];
Thank you very much
Luca
-
4 Aug 2011 9:45 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,684
- Vote Rating
- 435
Best way is not to return them. Try and set it as the idProperty on the Model... see if that works for strings.
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.
-
5 Aug 2011 12:18 AM #3
-
5 Aug 2011 4:48 AM #4Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,684
- Vote Rating
- 435
http://dev.sencha.com/deploy/touch/d...Ext.data.Model
Look for the idProperty config. Once again, I haven't used ids that are strings personally.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.


Reply With Quote