for(var i=0;i<formPanel.items.keys.length;i++){
我遍历我的formPanel后,要怎么得到这个formPanel下面items组件的值?就是怎么得到下面两个combo的值?
           }
   var form = new Ext.form.FormPanel({
            collapsible: true,
         resizable:false,
        frame:true,
         labelWidth: 100,
         baseCls:'x-panel-noborder',
        buttonAlign:'center',
        items: [{
            layout: 'column',
            height: 40,
            baseCls: 'background-color:#FFFFFF',
            items: [{
                xtype: 'label',
                columnWidth: .10,
                html: '移动通道:',
                cls: 'label1'
            }, {
                xtype:'combo',
             id:'ydChannl',
         name:'ydChannl',
         allowBlank:false,
         store : yddyncStore,
emptyText : "请选择",
isFormField : true,
mode : "remote",
triggerAction : "all",
valueField : "value",
displayField : "text",
editable : false,
                columnWidth: .30
            },{
                xtype: 'label',
                columnWidth: .20,
                html: '通道分配比例:',
                cls: 'label1'
            },{
               xtype: 'combo',
               id: 'ydlevel',
               name: 'ydlevel',
               displayField: 'text',
               valueField: 'value',
               editable: false,
               store: new Ext.data.SimpleStore({
                    fields: ['value', 'text'],
                     data: [[0, '0.1'], [1, '0.2']]
               }),
               triggerAction: 'all',
               readOnly: true,
               mode: 'local',
               value: '0',
               columnWidth: .20
            }]
        });

解决方案 »

  1.   


    Ext.getCmp('ydlevel').getRawValue()
      

  2.   

    ydChannl
    Ext.getCmp('panel的id').getComponent('items 控件1 的 id ').getValue();
    Ext.getCmp('panel的id').getComponent('items 控件2 的 id ').getValue();
     
      

  3.   


    还有,我放了一个添加按钮。动态添加行,我添加了第二行,我定义了一个全局变量id,每点一次添加按钮,id=id+1,
    然后增加的一行的id:'ydChannl'+id,
    现在,要怎么得到第二行下拉框的值?
      

  4.   

    一样的~~~
    Ext.getCmp(''ydChannl'+id).getValue();//getValue是对应的valueField的值 getRawValue()对应的是displayField的值