-
29 Mar 2012 10:48 AM #1
Unanswered: multiselect field
Unanswered: multiselect field
SALAM all.
how can i create a selectfiel with "picker" as itemType ???
-
29 Mar 2012 10:51 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 34,107
- Vote Rating
- 453
- Answers
- 3155
natively it only supports the picker and the single select list. This is not a simple fix to just turn the list to be able to handle multiselect but the get and set value needs to handle an array of values then.
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.
-
27 Jun 2012 12:50 PM #3
Does anyone have any suggestions to this problem?
-
27 Jun 2012 1:14 PM #4
SALAM bkcharan.
add this file to your solution
don't forget to add a ilnk to this file on index.htmlCode:Ext.ns("Ext.form.ux.touch"); Ext.form.ux.touch.MultiSelect = Ext.extend(Ext.form.Select, { columns: 2, itemWidth: 200, itemType: "list", multiSelect: true, showComponent: function() { var me = this, itemType = me.itemType, itemPanel; if (itemType === "picker") { me.getPicker().show(); } me.isActive = true; }, }); Ext.reg("multiselectfield", Ext.form.ux.touch.MultiSelect);
then you can create a multiselect field like this
NB: I used sencha touch 1Code:{ xtype: 'multiselectfield', id: 'request', label: 'Compte', store : 'storeCPT', displayField : "compteTYPE", valueField : "compteID", name : "multiselect-picker", itemWidth : 400, itemType : "picker", },
hope this help


Reply With Quote