1. #1
    Ext User
    Join Date
    Jan 2009
    Posts
    6
    Vote Rating
    0
    kevin price is on a distinguished road

      0  

    Arrow multi-column combobox via JSON?

    multi-column combobox via JSON?


    Hi. I have a form that is loading purely via JSON. like so:

    // grab raw JSON layout from php file:
    FormJSON=Ext.decode(GetFormJSON('myformjson.php?s='+seqno));

    // now create FormPanel to insert into window...
    var frm=new Ext.FormPanel(FormJSON);

    The form popups up great with comboboxes etc but what i need is to make my comboboxes multi-column. I can specify my single column comboboxes no problem via:

    {
    xtype:'combo',
    triggerAction:'all',
    fieldLabel: 'Employee',
    store:'["John","Sue","Frank"]',
    name: 'employee',
    value:'',
    },

    I've tried store: '[{"1","John"},{"2","Sue"},{"3","Frank"}]' but that doesn't work either. What is the format?

    Thanks for any help!
    Kevin.

  2. #2
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    86
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    The syntax for a static store of a combobox with a displayField/valueField config is:
    Code:
    [["1","John"],["2","Sue"],["3","Frank"]]
    But I don't think this is what you are asking...

  3. #3
    Ext User
    Join Date
    Jan 2009
    Posts
    6
    Vote Rating
    0
    kevin price is on a distinguished road

      0  

    Default


    Thanks Condor.

    Well, yes, that is what i'm asking. I just tried it and it it worked!

    Sorry to lead this along but where is that going to show up when it posts to the server when I save the record, only the name (ie Frank) shows up not the id.

    Regards
    Kevin.

  4. #4
    Ext User
    Join Date
    Jan 2009
    Posts
    6
    Vote Rating
    0
    kevin price is on a distinguished road

      0  

    Default


    Condor,

    Actually let me clarify, but you have solved 1/2 my problem...

    I can now get the display correct with the names of the employees, I didn't know about the displayField/valueField thing. How would I specify that the 1st element is the value and the 2nd is the Display and to post the value when it does the AJAX save later? I don't name the columns so I can't give them a name. On post I only get the displayValue (Frank).

    Regards,
    Kevin.

  5. #5
    Ext User
    Join Date
    Jan 2009
    Posts
    6
    Vote Rating
    0
    kevin price is on a distinguished road

      0  

    Default


    SOLVED!

    OK for the benefit of others, here is the solution:

    {
    xtype:'combo',
    triggerAction:'all',
    fieldLabel: 'Employee',
    store:'[["1","John"],["2","Sue"],["3","Frank"]]',
    name: 'employee',
    value:'',
    hiddenName: 'employee'
    },

    So i added "hiddenName", that makes it post the value not the text on the post.

    Thanks for everyone's help, especially Condor.
    Kevin.

  6. #6
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    86
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    Correct, the only thing you can leave out is the name:'employee' (it's either name or hiddenName, but not both).

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi