$ (' #cc '). ComboBox ({url: ' Combobox_data1.json ', method: ' Get ', Valuefield: ' ID ', TextField: ' Text ', Panelheight: ' Auto ', Multiple:true, Formatte R:function (Row) {var opts = $ (this). ComboBox (' Options '); Return ' <input type= ' checkbox ' class= ' Combobox-checkbox ' > ' + Row[opts.textfield '}, on Loadsuccess: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); } });
Implementing a CheckBox in a Easyui combobox