1. #1
    Sencha User
    Join Date
    Apr 2013
    Posts
    2
    Vote Rating
    0
    Ramesh.Mishra is on a distinguished road

      0  

    Default editable Grid-Combobox

    editable Grid-Combobox


    Hi,
    I want to populate data into the grid combo box using the response xml i am getting from my controller.
    So i am declaring the store as

    Code:
    var combostore = new Ext.data.Store({
                    
                    url: 'VoiceComp2Feature.srq',
                    root:'setComboResponseresult',
                    reader: new Ext.data.XmlReader({
                       record: 'resourceRow'
                    }, ComboData),
                    autoLoad:true
        });
    and then creating the record as

    Code:
    var ComboData = Ext.data.Record.create([           
               {name: 'tid', type: 'string'},
               {name: 'cname', type: 'string'}
          ]);
    This is the Column Model i created

    Code:
    {                
                    dataIndex : COMP2FEATURE.S.Col.FEATURENAME,
                    header : getLabel('Feature_S_Service_SwitchName'),
                    width : 300,
                    editor : new Ext.form.ComboBox( {
                                typeAhead : true,
                                triggerAction : 'all',
                                //transform : 'type',
                                //lazyRender : true,
                                listClass : 'x-combo-list-small',
                                mode: 'local',
                                store: combostore,
                                //valueField: 'name',
                                displayField: 'name'
                            })
                }
    xml generated is:
    HTML Code:
    <?xml version="1.0" encoding="UTF-8"  ?> 
      - <comboRequest>   - <resourceRow>     <tid>comp</tid>     <cname>c1</cname>    </resourceRow>  - <resourceRow>     <tid>comp</tid>     <cname>component1</cname>    </resourceRow>  - <resourceRow>     <tid>feature</tid>     <cname>Switch+Feature+Name</cname>    </resourceRow>  - <resourceRow>     <tid>feature</tid>     <cname>n1</cname>    </resourceRow>   </comboRequest>
    Kindly help me with this....I am very new to extjs and currently using the 2.3 framework, so not sure whether this is correct place to ask for this. Thanks.

  2. #2
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    4,770
    Vote Rating
    165
    slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold

      0  

    Default


    *Thread moved to the 2.x branch

    Your code you posted looked fine - worked for me with two changes.

    In the combobox change the displayName to one of your fields from your record: cname or tid

    and the XML should look like (I think I had removed a dash - maybe you copied from a browser and it inserted the dash):
    Code:
    <?xml version="1.0" encoding="ISO-8859-1"?>
        <comboRequest>-
            <resourceRow>
                <tid>comp</tid>
                <cname>c1</cname>
            </resourceRow>-
            <resourceRow>
                <tid>comp</tid>
                <cname>component1</cname>
            </resourceRow>-
            <resourceRow>
                <tid>feature</tid>
                <cname>Switch+Feature+Name</cname>
            </resourceRow>-
            <resourceRow>
                <tid>feature</tid>
                <cname>n1</cname>
            </resourceRow>
        </comboRequest>
    Are you a Sencha products veteran who has wondered what it might be like to work at Sencha? If so, please reach out to our recruiting manager: sheryl@sencha.com

    C
    heck out all of the 2013 SenchaCon presentations here:
    http://www.sencha.com/blog/senchacon...now-available/

Thread Participants: 1

Tags for this Thread

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar