在extjs中怎样获取combox中的所有值

解决方案 »

  1.   


    var s = new Ext.form.ComboBox({
    renderTo: Ext.getBody(),
    mode: 'local',
    editable:false,
       width: 120,   
       triggerAction: 'all',
       displayField:'displayText',
       valueField: 'value', 
    store: new Ext.data.SimpleStore({
       fields : ['displayText','value' ],
       data : [[ '红','red'], ['蓝', 'blue']]
       }),
       listeners: {
       select: function (c) {
       alert(c.getValue());
       }
       }
    });
      

  2.   

    http://examples.ext.net/