easyui combobox with checkbox item
$('#cc').combobox({
url:'combobox_data1.json',
method:'get',
valueField:'id',
textField:'text',
panelHeight:'auto',
multiple:true,
formatter: function (row) {
var opts = $(this).combobox('options');
return '<input type="checkbox" class="combobox-checkbox">' + row[opts.textField]
},
onShowPanel: function () {
var opts = $(this).combobox('options');
var target = this;
var values = $(target).combobox('getValues');
$.map(values, function (value) {
var el = opts.finder.getEl(target, value);
el.find('input.combobox-checkbox')._propAttr('checked', true);
})
},
onLoadSuccess: function () {
var opts = $(this).combobox('options');
var target = this;
var values = $(target).combobox('getValues');
$.map(values, function (value) {
var el = opts.finder.getEl(target, value);
el.find('input.combobox-checkbox')._propAttr('checked', true);
})
},
onSelect: function (row) {
//console.log(row);
var opts = $(this).combobox('options');
var el = opts.finder.getEl(this, row[opts.valueField]);
el.find('input.combobox-checkbox')._propAttr('checked', true);
},
onUnselect: function (row) {
var opts = $(this).combobox('options');
var el = opts.finder.getEl(this, row[opts.valueField]);
el.find('input.combobox-checkbox')._propAttr('checked', false);
}
});
easyui combobox with checkbox item的更多相关文章
- easyui combobox 带 checkbox
$('#cc').combobox({ url:'combobox_data1.json', method:'get', valueField:'id', textField:'text', pane ...
- easyui combobox 带 checkbox 亲自验证
$('#cc').combobox({ url:'combobox_data1.json', method:'get', ...
- 关于easyui combobox下拉框实现多选框的实现
好长时间没有更博了,一是因为最近真的比较忙,二是因为自己是真的偷懒了,哈哈 好啦,这篇博客主要是总结一些关于easyui combobox下拉框实现多选框的实现,包括前台界面的展示,和后台对数据的获取 ...
- easyui combobox 拼音检索快捷选择输入
easyui combobox 拼音检索快捷选择输入 效果如图 $.ajax({ url: UserActionUrl + '?action=listuserworktype', dataType ...
- easyui combobox点击输入框弹出下拉框
由于easyui combobox需要点击下拉箭头才能下拉,不能像select标签那样点击输入框就下拉,所以觉得不太方便,查看了一下,combobox弹出框是一个div,原本想在他的输入框的点击事件中 ...
- jQuery easyui combobox获取值|easyui-combobox获取多个值
Query easyui combobox事例: name="language" data-options=" ...
- easyui combobox onSelect事件
easyui combobox 没有onchange事件,只有onSelect事件 1 $(function () { $('#Select6').combobox({ onSelect: funct ...
- jquery easyui combobox 级联及触发事件,combobox级联
jquery easyui combobox 级联及触发事件,combobox级联 >>>>>>>>>>>>>>&g ...
- Easyui combobox onChange事件
Easyui combobox onChange事件: 注册事件: $(function () { $('#cc_id').combobox({ onChange: function (newValu ...
随机推荐
- yum(Fedora和RedHat以及SUSE中的Shell前端软件包管理器)命令详解
yum官方网站:http://yum.baseurl.org/ Fedora对于yum的介绍:http://fedoraproject.org/wiki/Yum yum(全称为 Yellow dog ...
- SQL事务对并发处理的支持
前言 继上次技术分享后,学到了关于mysql事务的许多新知识,感觉还是蛮有收获的.后来反过来想想,这些东西其实我们都接触过,最起码在自学考试的数据库系统原理那本书里面对事务的讲解,在里面就提到了事务的 ...
- Serialization之SOAP序列化
前言 XML序列化还可用于对象序列化符合SOAP规范的XML流.SOAP是一种简单的基于XML的协议,它使应用程序通过HTTP来交换信息.专门为使用XML来传输过程调用而设计的.如同常规的XML序列化 ...
- GuavaCache简介(一)
原文地址 http://blog.csdn.net/guozebo/article/details/51590517 前言 在多线程高并发场景中往往是离不开cache的,需要根据不同的应用场景来需要选 ...
- Django 实现的分页类
后台实现的一个分页类: from django.utils.safestring import mark_safe class Page: def __init__(self, current_pag ...
- Python判断字符串编码以及编码的转换
转自:http://www.cnblogs.com/zhanhg/p/4392089.html Python判断字符串编码以及编码的转换 判断字符串编码: 使用 chardet 可以很方便的实现字符串 ...
- Spring----. ref的用法
ref元素是用在property中,来设置需要引用的容器管理的其它Bean. 它的用法:<ref bean|local|parent="someBean"> ...
- Mybatis学习笔记(九) —— Mybatis逆向工程
一.什么是Mybatis逆向工程? 简单的解释就是通过数据库中的单表,自动生成java代码. 我们平时在使用Mabatis框架进行Web应用开发的过程中,需要根据数据库表编写对应的Pojo类和Mapp ...
- N - 嘤嘤嘤 (并查集+枚举)
Our lovely KK has a difficult Social problem. A big earthquake happened in his area. N(2≤N≤2000)N(2≤ ...
- java向mysql中写入中文出现乱码
乱码的原因有很多,我遇到的原因是url配置的问题,解决方案: 将: jdbc.url=jdbc:mysql://localhost:3306/XXXX?useUnicode=true&char ...