我使用form.getValues()方法得到整个表单的值,combo使用的是远程数据,加载时成功,但是用这个方法取的是显示的文本框的值,如何才能取到value值呢?看一下是不是我combo赋值的问题?
这是store:
var typeStore = new Ext.data.Store({
        proxy: new Ext.data.WCFHttpProxy({
            url: '/BaseinfoWcfService.svc/GetConsTypeList'
        }),
        reader: new Ext.data.WCFJsonReader({
            root: 'typeList'//,
            id: 'ID'
        }, ['ID', 'TypeName']
        ),
        remoteSort: false
    });
    typeStore.load();这是返回的json格式:
"{"typeList":[{"ID":1,"TypeName":"总包合同"}]}"
这是我combo的代码:
new Ext.form.ComboBox({
                        fieldLabel: '合同类别',
                        style: 'background: url(../images/pen.gif) #ffffff no-repeat 3px center;padding-left:15px;',
                        name: 'TYPE_ID',
                        hiddenValue: 'ID',
                        anchor: '95%',
                        mode: 'local',
                        triggerAction: 'all',
                        store: typeStore,
                        emptyText: '',
                        valueField: 'ID',
                        displayField: 'TypeName',
                        selectOnFocus: true,
                        allowBlank: false
                    })
高手来看一下