extjs4 combobox 多选与赋值 2017.1.10
来源:互联网 发布:球员对比的软件 编辑:程序博客网 时间:2024/06/11 04:43
初始化
xtype: 'combobox',editable: false,multiSelect: true,//启用多选queryModel: 'local',displayField: 'text',valueField: 'id',store: Store
多选赋值,数组
combobox.setValue([0,1]);combobox.setValue(['值1','值2']);
注意
Ext.define('TEST', { extend: 'Ext.data.Model', //fields: ['id','text'], //数字或字符串要一致,不然赋值不上 fields: [{name:'id',type:'string'},'text']});
下拉联动进行过滤
listeners: { 'change': function(field,newValue,oldValue,epots){ if (newValue != oldValue) { if(Store.data.length == 0 || field.getRawValue()==''){ Store.clearFilter(); }else{ Store.filterBy(function (item) { return newValue.length>1?Ext.Array.contains(newValue, String(item.get("pid"))):newValue[0]==item.get("pid"); }); } } }}
如果你的问题还是没有解决,欢迎留言
0 0
- extjs4 combobox 多选与赋值 2017.1.10
- extjs4 combobox 多选与赋值
- jQuery EasyUI combobox多选及赋值
- jQuery EasyUI combobox多选及赋值
- EasyUI combobox 多选及回显赋值
- ExtJs的ComboBox赋值与取值
- combobox赋值
- Extjs4 combobox 的使用
- Extjs4 combobox模糊查询
- extjs4 combobox 默认选择
- Extjs4 combobox hiddenName
- extjs4 grid combobox 联动
- Extjs4.0 Combobox的使用
- Extjs4带清空功能的ComboBox
- ExtJS4 combobox下拉框实现
- EXT combobox赋值
- C# combobox 如何赋值
- ExtJs Combobox赋值
- input输入框聚焦状态样式
- 五大原则让你的代码不再受bug的困扰
- C++笔记
- android 工程,点击图片,在屏幕显示
- ubuntu 14.04 下通过apt-get 安装jdk
- extjs4 combobox 多选与赋值 2017.1.10
- Oracle SQL增加、删除、更改表中的字段名
- 简析Android安装文件
- 我的第一篇博客--ScrollView中嵌套自定义ListView显示不全的解决方案
- 一、Web Service概述
- 高效的找出两个List中的不同元素
- PictureSelector(强大的图片选择器)
- Java中并发工具包 - 上
- MacOS原生开启移动硬盘NTFS文件系统写功能