zoukankan      html  css  js  c++  java
  • easyui commbox嵌入一个checkbox的实现

    function InitComBoBox(datagrid, combxid, formid, url, valueField, textField,_prompt) {
    $(combxid).combobox({
    url: Medicom.url + url,
    method: 'get',
    valueField: valueField,
    textField: textField,
    panelHeight: 'auto',
    multiple: true,
    200,
    editable: false,
    prompt: _prompt,
    formatter: function (row) {
    var opts = $(this).combobox('options');
    return '<label><input type="checkbox" class="combobox-checkbox"> ' + row[opts.textField] + '</label>'
    },
    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);
    })
    },
    onHidePanel: function () {
    //提交给后台进行查询
    },
    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) {
    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);
    }
    });
    }

  • 相关阅读:
    Microsoft Exchange Mail Flow Rule
    Microsoft Exchange Inactive mailbox
    Microsoft Exchange In-Place Hold and Litigation Hold
    Microsoft Exchange eDiscovery
    Microsoft Exchange Retention Policy
    JavaScript Array 操作
    CSS选择器优先级
    CSS实现垂直居中
    watch和computed和methods区别是什么?
    什么是async和await? 怎么捕获异常?
  • 原文地址:https://www.cnblogs.com/huangf714/p/6092978.html
Copyright © 2011-2022 走看看