$.extend ($.fn.datagrid.defaults.editors,{
ComboBox: {
Init:function (container, options) {
var combo = $ (' <input type= "text" > "). AppendTo (container);
Combo.combobox (Options | | {});
return combo;
},
Destroy:function (target) {
$ (target). ComboBox (' Destroy ');
},
Getvalue:function (target) {
var opts = $ (target). ComboBox (' Options ');
if (opts.multiple) {
return $ (target). ComboBox (' GetValues '). Join (Opts.separator);
} else {
return $ (target). ComboBox (' GetValue ');
}
},
Setvalue:function (target, value) {
var opts = $ (target). ComboBox (' Options ');
if (opts.multiple) {
if (value = = ") {
$ (target). ComboBox (' Clear ');
} else {
$ (target). ComboBox (' Setvalues ', Value.split (Opts.separator));
}
} else {
$ (target). ComboBox (' SetValue ', value);
}
},
Resize:function (target, width) {
$ (target). ComboBox (' resize ', width)
}
}
});
Easyui Editor ComboBox multiple