jeecg随笔 -- datagrid扩展editor的思路
easy ui 里的 datagrid 要扩展 editor
实际上只需要在现有可用的
text,textarea,checkbox,numberbox,validatebox,datebox,combobox,combotree
里 直接 参照
datetimebox : {init : function(container, options) {var editor = $('<input />').appendTo(container);editor.datetimebox(options);return editor;},destroy : function(target) {$(target).datetimebox('destroy');},getValue : function(target) {return $(target).datetimebox('getValue');},setValue : function(target, value) {$(target).datetimebox('setValue', value);},resize : function(target, width) {$(target).datetimebox('resize', width);}},multiplecombobox : {init : function(container, options) {var editor = $('<input />').appendTo(container);options.multiple = true;editor.combobox(options);return editor;},destroy : function(target) {$(target).combobox('destroy');},getValue : function(target) {return $(target).combobox('getValues').join(',');},setValue : function(target, value) {$(target).combobox('setValues', sy.getList(value));},resize : function(target, width) {$(target).combobox('resize', width);}}inputbox : {/* 可以禁用的输入域(实际上是扩展了combobox的功能)*/init : function(container, options) {var editor = $('<input />').appendTo(container);options.hasDownArrow = false;options.panelHeight = -1;editor.combobox(options);return editor;},destroy : function(target) {$(target).combobox('destroy');},getValue : function(target) {return $(target).combobox('getValue');},setValue : function(target, value) {$(target).combobox('setValue', value);},resize : function(target, width) {$(target).combobox('resize', width);}}