1. #1
    Sencha User
    Join Date
    Mar 2012
    Location
    Tunisia
    Posts
    74
    Vote Rating
    0
    zied jouini is on a distinguished road

      0  

    Default Unanswered: multiselect field

    Unanswered: multiselect field


    SALAM all.
    how can i create a selectfiel with "picker" as itemType ???

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    St. Louis, MO
    Posts
    34,107
    Vote Rating
    453
    Answers
    3155
    mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of

      0  

    Default


    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.

  3. #3
    Sencha Premium Member
    Join Date
    Mar 2012
    Location
    NYC, USA
    Posts
    61
    Vote Rating
    -1
    Answers
    1
    bkcharan is an unknown quantity at this point

      0  

    Default


    Does anyone have any suggestions to this problem?

  4. #4
    Sencha User
    Join Date
    Mar 2012
    Location
    Tunisia
    Posts
    74
    Vote Rating
    0
    zied jouini is on a distinguished road

      0  

    Default


    SALAM bkcharan.
    add this file to your solution
    Code:
    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);
    don't forget to add a ilnk to this file on index.html
    then you can create a multiselect field like this


    Code:
            {
    		xtype: 'multiselectfield',
                    id: 'request',
                    label: 'Compte',
    		store        : 'storeCPT',							
                    displayField : "compteTYPE",							
                    valueField   : "compteID",		
                    name         : "multiselect-picker",
                    itemWidth    : 400,				
                    itemType     : "picker",         
             
            },
    NB: I used sencha touch 1
    hope this help