ext combox 下拉框不出现自动提示,自动选中的解决方法
人气:0
看代码
var comboxContractType = new Ext.form.ComboBox({
name:'logisticsId',
fieldLabel:'物流公司',
displayField:'logisticsName',
valueField:'logisticsId',
emptyText:'请选择',
width:330,
editable:true,
allowBlank:false,
mode:'local',
loadingText:'loading...',
hiddenName:'logisticsId',
//pageSize:10,
selectOnFocus: true,
triggerAction:'all',
store:comboxContractTypeStore = new Ext.data.JsonStore({
url:'/pcmshttps://img.qb5200.com/download-x/dictionary/logistics.do?method=findLogistics',
root:'Datas',
totalProperty: 'TotalRecords',
fields:[
{name:'logisticsId', mapping:'logisticsid'},
{name:'logisticsName', mapping:'shortname'}
]
})
});
comboxContractTypeStore.load({params:{start:0,limit:100}});
注意3点:
别设置 PageSize 属性
mode属性设置为local 本地模式
最后要手动将用到的stroe进行load操作. stroe.load();
复制代码 代码如下:
var comboxContractType = new Ext.form.ComboBox({
name:'logisticsId',
fieldLabel:'物流公司',
displayField:'logisticsName',
valueField:'logisticsId',
emptyText:'请选择',
width:330,
editable:true,
allowBlank:false,
mode:'local',
loadingText:'loading...',
hiddenName:'logisticsId',
//pageSize:10,
selectOnFocus: true,
triggerAction:'all',
store:comboxContractTypeStore = new Ext.data.JsonStore({
url:'/pcmshttps://img.qb5200.com/download-x/dictionary/logistics.do?method=findLogistics',
root:'Datas',
totalProperty: 'TotalRecords',
fields:[
{name:'logisticsId', mapping:'logisticsid'},
{name:'logisticsName', mapping:'shortname'}
]
})
});
comboxContractTypeStore.load({params:{start:0,limit:100}});
注意3点:
别设置 PageSize 属性
mode属性设置为local 本地模式
最后要手动将用到的stroe进行load操作. stroe.load();
加载全部内容