MultiComboBox(本地数据源和远程数据源)

本地数据源

var qBzMemo =  new Ext.form.MultiComboBox({
     id                  : 'qBzMemo',
     anchor         : '100%',
        store         : new Ext.data.SimpleStore({  
                     fields        : ["name","value"],  
                     data        :[['从业资格证培训',0],['从业人员诚信考核',1]]
                    }),  
        valueField         : "value",  
                 displayField       : "name",  
                 labelSeparator       : ':',  
                 displaySeparator      : ';',  
                valueSeparator       : ',', 
                maxCount          : 2,
                 mode         : 'local',  
                 forceSelection       : true,  
                 hiddenName        : 'test',  
                 editable        : true,  
                 triggerAction       : 'all',  
                 allowBlank        : true,
                 fieldLabel        : '快速备注'
    });

 

远程数据源

 

 var eDrivecartypeStore = new Ext.data.JsonStore({
    url                : '../../../pubtransaction.do?method=getDriveCarType',
    root               : 'dataInfo',
    totalProperty      : 'totalCount',
    id                 : 'drivecartype',
    fields             : ['drivecartype','cartypecode'],
    sortInfo           : {field : 'drivecartype', direction : 'ASC'},
    baseParams     : {
       'dataFields'   : 'drivecartype,cartypecode'
  }
 });


  var eDrivecartype =  new Ext.form.MultiComboBox({
    id              : 'eDrivecartype',
    anchor    : '100%',
    store    : eDrivecartypeStore,
    valueField    : "drivecartype",
    displayField  : "cartypecode",
    labelSeparator  : ':',
    displaySeparator : ',',
    valueSeparator  : ',',
    maxCount     : 5,
    forceSelection  : true,
    editable   : true,
    triggerAction  : 'all',
    hiddenName   :'test',
    allowBlank   :true,
    emptyText   :'请选择',
    fieldLabel      : '准教车型'
 });

 

 

注意清空的方法为:

eDrivecartype.clearValue();

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值