日期:2014-05-16 浏览次数:20668 次
{ header: "供应商", width: 250, dataIndex: 'provider', editor: new Ext.form.ComboBox({ id:'prvcombobox', typeAhead: true, listClass: 'x-combo-list-small', emptyText:'请选择', displayField:'provider', selectOnFocus:true, triggerAction: 'all', store: store, lazyRender:true }) }
listeners:{ focus:function(obj){ var sm = oGrid.getSelectionModel(); var rd = sm.getSelected(); this.rdid = rd.id; }, change:function(obj){ var val = obj.getRawValue(); var rd = oStore.getById(this.rdid); rd.set("provider", val); getDetail(val, this.rdid); } },
------解决方案--------------------
我是这么做的
var strGoupSelectBox=new Ext.form.ComboBox({ typeAhead: true, triggerAction: 'all', lazyRender: true, transform:'prot_group', // -----------------------add by YDF at 2009-9-18 17:33:59 id:'goupSelectBox', name:'goupSelectBox', valueField:"keyid", // 提交表单时,下拉框的值 displayField:'name', // 显示在页面上下拉框的值 emptyText:'请选择..', editable:false, store: new Ext.data.JsonStore({ // 动态从后台提取数据并填充到 ComboBox autoLoad:true, fields: ['keyid', 'name'], url: '../data/sample_application_manager_getgroup_get_json.jsp', mathod:'post' }), listeners:{ select:function(strGoupSelectBox,record,index){ var groupValue = strGoupSelectBox.value; alert(groupValue); }} });