Ext下拉 ComboBox多选拓展代码(超好用)
2016-08-30 14:34
1081 查看
var multiSelect= Ext.define('Ext.ux.MultiComboBox', extend: 'Ext.form.ComboBox', xtype: 'multicombobox', id:'Select', name:'Select', fieldLabel:'标题', labelWidth: 150, width:350, labelAlign : 'left', // store:getDicStore('DIC'),//数据源 displayField: 'text', valueField: 'value', mode: 'local', initComponent: function(){ this.multiSelect = true; this.listConfig = { itemTpl : Ext.create('Ext.XTemplate', '<input type=checkbox>{text}'), onItemSelect: function(record) { var node = this.getNode(record); if (node) { Ext.fly(node).addCls(this.selectedItemCls); var checkboxs = node.getElementsByTagName("input"); if(checkboxs!=null) { var checkbox = checkboxs[0]; checkbox.checked = true; } } }, listeners:{ itemclick:function(view, item){ var isSelected = view.isSelected(item); var checkboxs = item.getElementsByTagName("input"); if(checkboxs!=null) { var checkbox = checkboxs[0]; if(!isSelected) { checkbox.checked = true; }else{ checkbox.checked = false; } } } } } this.callParent(); } });
感谢众多网络上资料作者的提供的内容,经过多次改造试验好用了,感谢!
相关文章推荐
- Ext下拉 ComboBox多选拓展代码(超好用)
- 扩展Ext的Combobox实现多选下拉列表
- 扩展Ext的Combobox实现多选下拉列表
- ext-2.0扩展多选下拉框(代码及演示)
- ext-2.0扩展多选下拉框(代码及演示)
- ext-2.0扩展多选下拉框(代码及演示)
- ext-2.0扩展多选下拉框(代码及演示)
- Ext 带复选框的多选下拉框 MultiSelectComboBox
- ext-2.0扩展多选下拉框(代码及演示)
- combobox实现下拉多选的终结解决方案
- JS实现支持多选的遍历下拉列表代码
- SendMessage 使用代码控制Combobox到下拉效果_ComboBox
- C# 程序中如何向(DEV)ComboBoxEdit控件中添加下拉列表的值不使用数据绑定,就是使用代码添加
- Extjs 多选下拉框 Ext.ux.form.LovCombo默认选择及其它BUG修复版支持多选/全选/全不选ext3.x
- 可输入可联想的下拉列表的实现——Ext ComboBox
- C#中comboBox下拉框中实现多选
- Ext.form.ComboBox 动态加载数据后设置下拉选项
- gwt-ext中级联的ComboBox的下拉数据的分页
- Ext中下拉列表ComboBox组件store数据格式
- EVC win32开发 combobox下拉选择 代码